Column Vector in LaTeX (\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.
\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
- Matrix
\begin{bmatrix} a & b \\ c & d \end{bmatrix} - Lambda
\lambda - Zero Matrix
\mathbf{0} - Identity Matrix
I_n - Kronecker Delta
\delta_{ij} - Multiplication
\times
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.
Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf
Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI
- Gumawa ng magagandang TikZ diagrams gamit ang AI
- Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
- Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers