17

At times it's convenient to write a matrix in terms of it's row or column component vectors instead of explicitly giving each particular scalar entry. I'm basically talking about this:

enter image description here

I did some research, but I couldn't find any way to express a matrix in this way.

2 Answers 2

12

Check this:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

% Vertically stacked
\[
\begin{bmatrix}
    \vert & \vert \\
    v_1   & v_2   \\
    \vert & \vert
\end{bmatrix}
\]

% Horizontally stacked
\[
\begin{bmatrix}
    \text{---} & v_1 & \text{---} \\
    \text{---} & v_2 & \text{---}
\end{bmatrix}
\]

\end{document}

enter image description here

The white space in the horizontal matrix can be reduced ad-hoc, using \hspace{}. For example:

% Horizontally stacked
\[
\begin{bmatrix}
    \text{---} \hspace{-0.2cm} & v_1 & \hspace{-0.2cm} \text{---} \\
    \text{---} \hspace{-0.2cm} & v_2 & \hspace{-0.2cm} \text{---}
\end{bmatrix}
\]

Producing:

enter image description here

4

enter image description here

\documentclass{article}

\usepackage{mathtools}

\begin{document}
\[
\begin{bmatrix}
 \vdots & \vdots \\
 v_1 & v_2\\
 \vdots & \vdots
\end{bmatrix}
\]
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .