11

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.

dsmith
  • 113

2 Answers2

10

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

David Carlisle
  • 757,742
egreg
  • 1,121,712
3

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}
Werner
  • 603,163