2

I want to make a matrix with elements like in the image:enter image description here

How can I do this?

Thank you!

1
  • 4
    \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} ?, using the amsmath package – user31729 Apr 13 '16 at 14:24
15

A column vector is just a matrix with one column (from a typesetting point of view ;-)), so just use one of the various matrix possibilities and typeset with \\ to switch to the next row.

Of course, mathmode is needed for this.

\documentclass{article}

\usepackage{mathtools}
\begin{document}
$
\begin{pmatrix}
  \alpha_{1} \\
  \alpha_{2} \\
  \vdots \\
  \alpha_{m} \\
\end{pmatrix}
\neq
\begin{Bmatrix}
  \alpha_{1} \\
  \alpha_{2} \\
  \vdots \\
  \alpha_{m} \\
\end{Bmatrix}
\neq
\begin{bmatrix}
  \alpha_{1} \\
  \alpha_{2} \\
  \vdots \\
  \alpha_{m} \\
\end{bmatrix}
\neq
\begin{vmatrix}
  \alpha_{1} \\
  \alpha_{2} \\
  \vdots \\
  \alpha_{m} \\
\end{vmatrix}
\neq
\begin{Vmatrix}
  \alpha_{1} \\
  \alpha_{2} \\
  \vdots \\
  \alpha_{m} \\
\end{Vmatrix}
$
\end{document}

Use pmatrix for parentheses, Bmatrix for braces and bmatrix for brackets, vmatrix for single vertical lines, Vmatrix for doubled vertical lines.

enter image description here

2

Because this is typical non-LaTeX specific question (because this is question of type: give me a code, I don't want to think about it), I can reply: use simply \pmatrix or \matrix.

Edit The result exactly the same as in the answer above can be accomplished by the code:

\def\mmatrix#1#2#3{\left#1\matrix{#2}\right#3}
$$
  \pmatrix    {\alpha_1 \cr \alpha_2 \cr \vdots \cr \alpha_m}    \neq
  \mmatrix \{ {\alpha_1 \cr \alpha_2 \cr \vdots \cr \alpha_m} \} \neq
  \mmatrix [  {\alpha_1 \cr \alpha_2 \cr \vdots \cr \alpha_m}  ] \neq
  \mmatrix |  {\alpha_1 \cr \alpha_2 \cr \vdots \cr \alpha_m}  | \neq
  \mmatrix \| {\alpha_1 \cr \alpha_2 \cr \vdots \cr \alpha_m} \|
$$
\bye

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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