2

How can I create a vector like this one?

two-column vector

It is similar to this question, but with additional columns.

1
  • The precise output depends on the desired packages ;-)
    – user31729
    Oct 8, 2014 at 16:39

1 Answer 1

4

Quick and dirty approach with pmatrix environment

The individual columns are separated by a & character, the next linebreak is achieved with \\

If one replaces pmatrix with bmatrix, the [ ] version is obtained

\documentclass[12pt]{article}

\usepackage{mathtools}

\begin{document}

\begin{equation*}
 A =  \begin{pmatrix}
   3 & 5 \\
   5 & 2 \\
   2 & 1 \\
   1 & 4 \\
   7 & 9 
   \end{pmatrix}
\end{equation*}

\end{document}

enter image description here

7
  • Why not \\ instead of \cr?
    – Manuel
    Oct 8, 2014 at 16:51
  • @Manuel: I always used \cr ;-) If it works with \\ too, the better ;-)
    – user31729
    Oct 8, 2014 at 16:51
  • clean enough for me ;-)
    – alex
    Oct 8, 2014 at 16:54
  • 1
    @ChristianHupfer Can you tell me where in the LaTeX manual or the doc for amsmath there's a description of \cr? Possibly I didn't read them carefully enough. Out of joke: DON'T use \cr in LaTeX documents.
    – egreg
    Oct 8, 2014 at 17:55
  • 1
    @ChristianHupfer It's not “old style”: it's wrong. You may have seen \matrix{1 & 2\cr 3 & 4\cr} using the LaTeX command inherited from Plain, that's supplanted by matrix of amsmath (and the other environments adding parentheses). See tex.stackexchange.com/questions/57658/…
    – egreg
    Oct 8, 2014 at 18:04

You must log in to answer this question.

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