Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to produce a graphical representation of a matrix as stack of row vectors. Because I will be publishing the math on a website, I have access to the amsmath package but no others. I find that I can produce a representation of a matrix as a stack of column vectors using the following code

\left(
\begin{array}{ccc} 
\vline & \vline & \vline \\
\vline & \vline & \vline \\
\vline & \vline & \vline \\
\end{array}
\right)

What I would like is a transpose of this.

This question is similar to How do I typeset vertical and horizontal lines inside a matrix? and Long dashes for denoting omitted columns of a matrix, but when I apply the approaches found in those posts, I do not obtain a continuous horizontal line.

share|improve this question
    
Not great, but try \left(\begin{array}{ccc} & & \\ \hline & & \\ \hline & & \\ \hline & & \end{array} \right) –  Vivi Jun 12 '12 at 19:02
    
Welcome to TeX.SX! Just use one column and say \rule[2.2pt]{4em}{0.4pt} in each row. Here 4em is the width, adjust to suit. –  egreg Jun 12 '12 at 19:03
    
In essence, what @egreg says is the same as what the accepted answer to the first linked question proposes. Can you say more precisely what your problems with this approach are? –  Hendrik Vogt Jun 12 '12 at 19:09
    
@egreg Thanks! That would seem to do the trick. –  dsmith Jun 13 '12 at 21:14
    
@Hendrik Yes, I agree now. I think I didn't understand the answer well enough at the time I posted. –  dsmith Jun 13 '12 at 21:16

2 Answers 2

up vote 5 down vote accepted

Saying simply \vline is not the best method, in my opinion. Try

\documentclass{article}
\usepackage{amsmath}

\begin{document}
$\begin{pmatrix}
\kern.6em\vline & \kern.2em\vline\kern.2em & \vline\kern.6em \\
\kern.6em\vline & \kern.2em\vline\kern.2em & \vline\kern.6em \\
\kern.6em\vline & \kern.2em\vline\kern.2em & \vline\kern.6em \\
\end{pmatrix}
\begin{pmatrix}
\rule[.5ex]{3.5em}{0.4pt}\\
\rule[.5ex]{3.5em}{0.4pt}\\
\rule[.5ex]{3.5em}{0.4pt}
\end{pmatrix}$
\end{document}

enter image description here

share|improve this answer
    
Thanks, egreg. Just what I was looking for. –  dsmith Jun 13 '12 at 21:18

Here is a mild mockup of two different approaches that doesn't require amsmath. The second requires graphicx though. It duplicates your existing column representation, just horizontally:

enter image description here

\documentclass{article}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\begin{document}
\[
  \left(
  \begin{array}{ccc} 
    \vline & \vline & \vline \\
    \vline & \vline & \vline \\
    \vline & \vline & \vline
  \end{array}
  \right) \quad
  \left(
  \begin{array}{p{3em}} 
    \raisebox{.5ex}{\rule{3em}{.4pt}} \\[\dimexpr-2\normalbaselineskip+2\tabcolsep]
    \raisebox{.5ex}{\rule{3em}{.4pt}} \\[\dimexpr-2\normalbaselineskip+2\tabcolsep]
    \raisebox{.5ex}{\rule{3em}{.4pt}}
  \end{array}
  \right)
\]
\[
  \left(
  \begin{array}{ccc} 
    \vline & \vline & \vline \\
    \vline & \vline & \vline \\
    \vline & \vline & \vline
  \end{array}
  \right) \quad
  \left(
  \begin{array}{c} 
    \rotatebox{90}{$
      \begin{array}{ccc} 
        \vline & \vline & \vline \\
        \vline & \vline & \vline \\
        \vline & \vline & \vline
    \end{array}$}
  \end{array}
  \right)
\]
\end{document}
share|improve this answer
    
Thanks, Werner, also a helpful answer. –  dsmith Jun 13 '12 at 21:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.