LA 101
M02 · L01
Module 2

What is a Matrix?

Vectors were arrows. Now we arrange numbers into rectangles and unlock the power to describe entire systems at once. Welcome to the world of matrices.

01 / 13
LA 101
M02 · L01
Definition

A Grid of Numbers

A matrix is a rectangular array of numbers arranged in rows and columns. Think of it as a spreadsheet: each cell holds one number, and position matters.

A 2×3 Matrix
A = \begin{bmatrix} 1 & 4 & 7 \\ 2 & 5 & 8 \end{bmatrix}
02 / 13
LA 101
M02 · L01
Shape

Matrix Dimensions

An m × n matrix has m rows and n columns. Always rows first, columns second. A 3×2 matrix has 3 rows and 2 columns — 6 entries total.

Rows
m
Columns
n
Total
m×n
03 / 13
LA 101
M02 · L01
Convention

Matrix Notation

We name matrices with bold uppercase letters: A, B, M. Individual entries use lowercase with subscripts: aij is the entry in row i, column j.

Entry Notation
A = [a_{ij}] \quad \text{where } 1 \le i \le m,; 1 \le j \le n
04 / 13
LA 101
M02 · L01
Perspective 1

Columns as Vectors

Every matrix is a collection of column vectors standing side by side. A 3×2 matrix packs two column vectors, each with 3 components. This perspective is key to understanding matrix-vector multiplication.

Column View
A = \begin{bmatrix} \mid & \mid \\ \mathbf{c}_1 & \mathbf{c}_2 \\ \mid & \mid \end{bmatrix}
05 / 13
LA 101
M02 · L01
Perspective 2

Rows as Vectors

Flip it: a matrix is also a stack of row vectors. Each row captures one equation, one data point, or one constraint. Rows and columns offer dual perspectives on the same data.

Column View
Transformation
Row View
Constraints
06 / 13
LA 101
M02 · L01
Special Matrices

The Identity Matrix

The identity matrix I has 1s on the diagonal and 0s everywhere else. It is the “do nothing” matrix: multiply any matrix by I and nothing changes. It is the matrix equivalent of multiplying by 1.

3×3 Identity
I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}
07 / 13
LA 101
M02 · L01
Special Matrices

Zero & Diagonal

The zero matrix has all entries equal to 0 — the matrix equivalent of the number zero. A diagonal matrix has nonzero entries only on the main diagonal. Diagonal matrices are simple yet powerful: they scale each coordinate independently.

  • Zero matrix: A + 0 = A
  • Diagonal: scales each axis
  • Identity: special diagonal (all 1s)
08 / 13
LA 101
M02 · L01
Special Matrices

Symmetric Matrices

A matrix is symmetric if it equals its own transpose: A = AT. The entry in row i, column j equals the entry in row j, column i. Symmetric matrices appear everywhere: distance tables, covariance matrices, graph adjacency.

Symmetry Condition
A = A^T ;\Longleftrightarrow; a_{ij} = a_{ji} ;\forall\, i,j
09 / 13
LA 101
M02 · L01
Operation

The Transpose

The transpose AT flips a matrix over its diagonal: rows become columns and columns become rows. An m×n matrix becomes an n×m matrix. It is like rotating the grid 90° and mirroring.

Transpose
\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}^T = \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix}
10 / 13
LA 101
M02 · L01
Real World

Matrices Everywhere

Every digital image is a matrix of pixel values. Every neural network layer is a matrix multiplication. Every spreadsheet is a matrix. Once you see them, you cannot unsee them.

  • Images: pixel grids (height × width)
  • ML: weight matrices in neural nets
  • Graphics: transformation matrices
  • Physics: stress tensors, inertia
  • Data: rows = samples, cols = features
11 / 13
LA 101
Knowledge Check

Check what stuck

Four questions from this lesson. Answer to see why — the explanation appears whether you were right or wrong. Nothing is scored or saved.

Question 1 of 0
Score 0/0

12 / 13
LA 101
M02 · L01
Coming Up

Next: Matrix Operations

Now that we know what a matrix is, we will learn what we can do with them — addition, scalar multiplication, and the all-important matrix-vector product.

Next Lesson
13 / 13