Column Vector in LaTeX (\begin{pmatrix} x \\ y \end{pmatrix})

(xy)\begin{pmatrix} x \\ y \end{pmatrix}
LaTeX command
\begin{pmatrix} x \\ y \end{pmatrix}
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

pmatrix with one column, stacking x over y as a column vector in parentheses.

Each \\ starts a new row, so a single column of entries becomes a vertical vector, the usual way to write coordinates in R^2 or the right-hand side of a linear system. Parentheses (pmatrix) and square brackets (bmatrix) are equally standard; pick one style for the whole document. To save vertical space in running text, write a transposed row instead, (x, y)^{\top}. For long vectors, use \vdots in a middle row, as in x_1 \\ \vdots \\ x_n. Inline column vectors look cramped and push lines apart; smallmatrix is the compact alternative when one is unavoidable.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

A(xy)=(10)A\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \end{pmatrix}
\documentclass{article}
\begin{document}
Column Vector: $\begin{pmatrix} x \\ y \end{pmatrix}$

\[ A\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \end{pmatrix} \]
\end{document}

Related symbols

All Lineaire Algebra →

Frequently asked questions

How do I write Column Vector in LaTeX?
Type \begin{pmatrix} x \\ y \end{pmatrix} in math mode, for example $A\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$. It works in plain LaTeX without loading any package.
Which package do I need for \begin{pmatrix} x \\ y \end{pmatrix}?
None. \begin{pmatrix} x \\ y \end{pmatrix} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \begin{pmatrix} x \\ y \end{pmatrix} in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\begin{pmatrix} x \\ y \end{pmatrix}$ in running text.
Math poweredSchrijf LaTeX met AI

Beste AI LaTeX Editor, Overleaf Alternatief

Octree helpt onderzoekers van 15+ universiteiten sneller onderzoeksartikelen schrijven met AI

  • Genereer mooie TikZ-diagrammen met AI
  • Upload afbeelding en converteer naadloos naar LaTeX
  • Krijg directe hulp bij het schrijven en opmaken van onderzoeksartikelen