Home / Courses / Linear Algebra / Unit 2
Linear Algebra Unit 2: Matrix algebra
Matrix algebra lets you treat whole systems as single objects. Multiplication and inverses are the key operations.
Covers: Matrix operations, inverses, elementary matrices, LU factorization
Study guide
Matrices can be added entry by entry and multiplied by scalars. The product AB is defined when A's number of columns equals B's number of rows; entry (i, j) of AB is row i of A dotted with column j of B. Equivalently, each column of AB is A times a column of B. Matrix multiplication is associative and distributive but not commutative: AB ≠ BA in general, and AB = 0 doesn't force A or B to be 0. The transpose Aᵀ swaps rows and columns, and (AB)ᵀ = BᵀAᵀ.
A square matrix A is invertible if some A⁻¹ satisfies AA⁻¹ = A⁻¹A = I. For a 2×2 matrix [a b; c d], A⁻¹ = (1/(ad − bc))[d −b; −c a], which exists only if ad − bc ≠ 0. For larger matrices, row reduce [A | I]; if A reduces to I, the right side becomes A⁻¹. If A is invertible, Ax = b has the unique solution x = A⁻¹b. Also (AB)⁻¹ = B⁻¹A⁻¹.
The Invertible Matrix Theorem links many equivalent conditions: A is invertible, A has n pivots, Ax = 0 has only the trivial solution, the columns are linearly independent and span ℝⁿ, and det A ≠ 0.
Elementary matrices perform one row operation when multiplied on the left. An LU factorization writes A = LU with L lower triangular and U upper triangular (row echelon form), which makes solving many systems with the same A fast: solve Ly = b, then Ux = y.
To find A = LU without row swaps, do elimination to get U and record each multiplier: if you subtract ℓ times row j from row i, put ℓ in position (i, j) of L. L has 1s on its diagonal and these multipliers below it. AB can also be written as a sum of (column k of A) times (row k of B). A column times a row, uvᵀ, is a rank-one matrix: every column is a multiple of u, and its trace is v·u.
Before computing a high power, check small powers. If A² = cI, then A²ᵏ = cᵏI and A²ᵏ⁺¹ = cᵏA. If that pattern doesn't appear, diagonalize instead.
Key ideas
- AB is defined when A's columns equal B's rows; entry (i, j) is row i of A dotted with column j of B.
- Matrix multiplication isn't commutative.
- A is invertible if some A⁻¹ gives AA⁻¹ = I.
- Find A⁻¹ by row reducing [A | I] to [I | A⁻¹].
- LU factorization writes A as lower × upper triangular, which speeds up solving many systems.
Formulas and rules
Common mistakes
- Writing (AB)⁻¹ = A⁻¹B⁻¹.
- Assuming AB = 0 means A = 0 or B = 0.
Words to know
- Matrix product AB defined
- Columns of A = rows of B.
- (AB)⁻¹
- B⁻¹A⁻¹
- Inverse of [a b; c d]
- (1/(ad − bc))·[d −b; −c a]
- Inverse by row reduction
- Row reduce [A | I] to [I | A⁻¹].
- (AB)ᵀ
- BᵀAᵀ
- Transpose
- Aᵀ swaps rows and columns.
- Identity matrix (I)
- Square matrix with 1s on the diagonal; AI = IA = A.
- Invertible matrix
- A square matrix with A⁻¹ such that AA⁻¹ = I.
- Invertible Matrix Theorem
- Invertible ⇔ n pivots ⇔ only the trivial solution ⇔ det ≠ 0 (and more).
- Elementary matrix
- Performs one row operation when multiplied on the left.
- LU factorization
- A = LU with L lower triangular and U upper triangular.
- Matrix multiplication properties
- Associative and distributive, but not commutative.
Sample practice questions
27 more questions like these, from level 1 to 5, are in the practice set.
A is 2 × 3 and B is 3 × 4. Size of AB?
- 4 × 2
- Undefined
- 3 × 3
- 2 × 4
Show the answer and steps
Answer: D) 2 × 4
- (2 × 3)(3 × 4): inner dimensions match.
- The result takes the outer dimensions: 2 × 4.
[1 2; 3 4] times [1; 1].
- [3; 4]
- [2; 7]
- [4; 6]
- [3; 7]
Show the answer and steps
Answer: D) [3; 7]
- Row 1: 1·1 + 2·1 = 3.
- Row 2: 3·1 + 4·1 = 7.
- [3; 7].
Inverse of [2 1; 5 3].
- [3 1; 5 2]
- [2 −1; −5 3]
- [3 −1; −5 2]
- [−3 1; 5 −2]
Show the answer and steps
Answer: C) [3 −1; −5 2]
- det = 2·3 − 1·5 = 1.
- Swap the diagonal, negate the off-diagonal, divide by det.
- [3 −1; −5 2].