Skip to content

Matrix

Definition

A matrix is a rectangular array of elements of a field, arranged in rows and columns. A matrix with mm rows and nn columns has size m×nm\times n.

Two matrices are equal if and only if they have the same size and all corresponding entries are equal. A square matrix is a matrix with the same number of rows and columns.


Interpretation

Matrices store coefficients, describe linear maps in coordinates, and organize data in a way that supports algebraic operations. A matrix is a table of numbers in which the position of each entry carries meaning: its row and its column.

A 3 by 4 matrix of entries a ij with row 2 and column 3 highlighted and the entry a23 at their crossing, and brackets marking 3 rows and 4 columns.

The figure shows a 3×43\times4 matrix: m=3m=3 rows and n=4n=4 columns, always counted in that order. The green entry a23a_{23} lies where row 22 crosses column 33; the first index gives the row and the second the column, so a32a_{32} would be a different position. The size is read "33 by 44".

What rows and columns mean depends on the use. In a linear system in standard form, each row holds the coefficients of one equation and each column belongs to one unknown. For the map x↦Ax\boldsymbol{x}\mapsto\boldsymbol{A}\boldsymbol{x} from Rn\mathbb{R}^n to Rm\mathbb{R}^m, column jj is the image of the jjth standard basis vector, so the number of columns is the number of input coordinates. In a data table, rows often correspond to observations and columns to variables.

A common slip is to treat a matrix as just a collection of numbers. The arrangement matters: (12)\begin{pmatrix}1&2\end{pmatrix} and (12)\begin{pmatrix}1\\2\end{pmatrix} contain the same numbers but are different matrices, of sizes 1×21\times2 and 2×12\times1. Special shapes are studied on their own pages, such as the identity matrix and symmetric matrices, which equal their transpose.


Key Results

  • Rows are listed first and columns second: an m×nm\times n matrix has mm rows and nn columns.
  • A matrix can be viewed as a list of vertical or horizontal vectors; an n×1n\times1 matrix is a column vector and a 1×n1\times n matrix is a row vector.
  • Matrices of different sizes cannot be equal; matrices of the same size are equal exactly when their corresponding entries match.

Examples

  • (1234)\begin{pmatrix}1&2\\3&4\end{pmatrix} is a 2×22\times2 square matrix.
  • (123456)\begin{pmatrix}1&2&3\\4&5&6\end{pmatrix} is a 2×32\times3 matrix and is not square.

Prerequisites

Sources

Keywords: matrices, square matrix, rectangular matrix, order of a matrix, matrix equality, equal matrices Symbols: real numbers

Last updated: 20 October 2026 03:02