[abcd]\begin{bmatrix} a & b \\ c & d \end{bmatrix}

A matrix written out

Square brackets around a grid of numbers show a matrix entry by entry. Each line is a row; each position across a line is a column.

Read a matrix by its shape first: count the rows, then the columns, and say "rows by columns". A matrix with 4 rows and 2 columns is "4 by 2", written 4×24 \times 2. As a weight matrix acting on a row vector, a 4×24 \times 2 matrix turns a 4-number input into a 2-number output. Often the shape is all you need to follow the argument.

(In the LaTeX source, & separates columns and \\ starts a new row.)

Example

[102503]∈R3×2\begin{bmatrix} 1 & 0 \\ 2 & 5 \\ 0 & 3 \end{bmatrix} \in \mathbb{R}^{3 \times 2}

Three rows, two columns: a 3×2 matrix.

Where the course uses it

Related terms