[Tex/LaTex] Horizontal line representing row vector in matrix

math-modematrices

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.

Best Answer

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