← Algebra → Linear Algebra Lesson 5 of 12
Algebra → Linear Algebra · Lesson 5

Matrices: Introduction & Operations

Matrices are rectangular arrays of numbers. They're the data structure of linear algebra — used in graphics, machine learning, physics simulations, and solving large systems of equations.

Key Concepts

Matrix Notation

An m×n matrix has m rows and n columns. Entry aᵢⱼ is in row i, column j. A 2×3 matrix has 2 rows and 3 columns. Vectors are 1×n (row) or n×1 (column) matrices.

Matrix Addition & Scalar Multiply

Add matrices of the same size by adding corresponding entries. Scalar multiply: k·A multiplies every entry by k. These operations are element-wise.

Matrix Multiplication

A (m×n) · B (n×p) = C (m×p). Entry cᵢⱼ = dot product of row i of A and column j of B. Note: AB ≠ BA in general. Non-commutative!

Special Matrices

Identity matrix I: 1s on diagonal, 0s elsewhere. AI = IA = A. Zero matrix: all entries 0. Transpose Aᵀ: swap rows and columns. Symmetric: A = Aᵀ.

Live Python Practice

Interactive Lab

A:     B:
Adjust 2×2 matrices A and B. Switch between addition and multiplication. Notice AB ≠ BA for most matrices!

Check Your Understanding

A 3×4 matrix has:

Matrix multiplication AB is defined when:

The identity matrix I satisfies:

← Lesson 4 Lesson 6 →