How to make this matrix in LaTeX? [duplicate]

Ok, so I am trying to find a way to make this matrix shown here, in LaTeX:

I tried to search for this type, but I frankly do not know what one would call this, so I had to draw a picture shown here to illustrate what I mean. So basically, I want a matrix, but I need to make lines as rows as shown here, with the respective $$x_i^T$$ shown as well.

Would appreciate any help, thanks.

-

marked as duplicate by Count Zero, David Carlisle, diabonas, mafp, egregApr 10 '13 at 21:33

Hello! I had this question a little while ago: tex.stackexchange.com/q/57411/10679. Hope this helps! –  kan Apr 10 '13 at 20:14
@kan Never mind it works! Question - how to change to make it vertical lines? Thanks!! –  TyranaSaur Apr 10 '13 at 20:36
Oh, I think the code in question shows how there is an easy code for vertical lines using \bigg|. There is no such easy solution for the horizontal lines, which motivated the question. –  kan Apr 10 '13 at 20:51
@kan Thanks again! I have a second part to this question here. –  TyranaSaur Apr 10 '13 at 20:57

I'm not sure the following is the best of doing it, but here goes:

\documentclass{article}

\usepackage{amsmath}

\newcommand\myrule[1]{%
\raisebox{.5ex}{\rule{3em}{.7pt}}
\, #1 \,
\raisebox{.5ex}{\rule{3em}{.7pt}}
}

\begin{document}
$$X = \begin{bmatrix} \myrule{x_1^T} \\[1ex] \myrule{x_2^T} \\[1ex] \myrule{x_3^T} \end{bmatrix}$$
\end{document}

-
Interesting Jubobs. I have tried it and it seems to work. Expanding on this, how would I be able to make something as shown here? Thanks. –  TyranaSaur Apr 10 '13 at 21:12