A square or rectangular set of numbers, usually written enclosed in a large pair of brackets. There are special rules for adding and multiplying matrices that make them useful for representing linear transformations and linear equations.

For example, the equations

\[\begin{align*} x + 2y + 3z &= 1\\ 2x + 5y + 7z &= 2\\ x + 4y \phantom{{}+2z} &= 3 \end{align*}\]

can be represented by the single matrix equation \[\mathbf{Ax} = \mathbf{B}\] where \[\mathbf{A} = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 5 & 7 \\ 1 & 4 & 0 \end{pmatrix}, \quad \mathbf{x} = \begin{pmatrix} x \\ y \\ z \end{pmatrix}, \quad\text{and}\quad \mathbf{B} = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}.\]

Matrices can be used to represent many physical quantities which have multiple components in a simple but useful form. For example, the various moments of inertia that a solid has about different axes of rotation can be expressed in a single \(3 \times 3\) matrix.