Mathematics
2×2 matrix - formula in LaTeX
A matrix in round brackets. Columns are separated with &, rows with a double backslash. The bmatrix environment gives square brackets and vmatrix the bars of a determinant. All three need the amsmath package.
LaTeX code
$$
\begin{pmatrix} a & b \\ c & d \end{pmatrix}
$$Got this formula in your notes or on a whiteboard? Snap a photo and CamteX turns it into LaTeX. Try it free
What the symbols mean
- entries of the first row
- entries of the second row
A math formula - one of the most frequently typed in assignments, lecture notes and calculus or algebra homework.
Worked example
The determinant of a 2×2 matrix is the product of the main diagonal minus the product of the other one. \det sets the abbreviation upright, like \sin or \log.
Other ways to write it
Square brackets, common in linear algebra and English-language papers.
\begin{bmatrix} a & b \\ c & d \end{bmatrix}The inverse of a 2×2 matrix, provided the determinant ad − bc is nonzero.
A^{-1} = \dfrac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}A small matrix for use inside a sentence, without stretching the line spacing.
\left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\right)
LaTeX commands in this formula
\begin{pmatrix}- matrix in ( )
How to use this formula in LaTeX?
- Copy the code with the button above -
$$…$$is centered display math. - Paste it into the CamteX editor, Overleaf or any LaTeX document.
- Inside a sentence, use single
$…$instead of double. - The formula needs the
amsmathpackage - CamteX templates include it in the preamble.
Related formulas - Mathematics
Drawing formulas is faster than typing them.
Draw a formula, table or chart - CamteX AI turns it into ready LaTeX and inserts it into your document.