Matrices solve systems of linear equations compactly, and eigenvalues reveal the key directions of a matrix. Both are used in graphics, data science and AI.
Solving linear equations with matrices
A system such as x + y = 3 and x − y = 1 is written AX = B:
[1 1; 1 −1] [x; y] = [3; 1].
- Inverse method: if det A ≠ 0, X = A⁻¹B. Here det A = −2, A⁻¹ = (1/−2)[−1 −1; −1 1] = [½ ½; ½ −½]. Then X = [½·3 + ½·1; ½·3 − ½·1] = [2; 1]. So x = 2 and y = 1.
- Consistency by rank: with the augmented matrix [A | B]: if rank A = rank [A | B] = n (number of unknowns), there is a unique solution; if the ranks are equal but less than n, there are infinitely many; if the ranks differ, there is no solution.
- Gaussian elimination: use row operations to reach a triangular form, then back-substitute.
Eigenvalues and eigenvectors
For a square matrix A, a non-zero vector v and a number λ with Av = λv are an eigenvector and its eigenvalue. The vector keeps its direction and only gets scaled.
To find them, solve the characteristic equation det(A − λI) = 0.
Example: A = [2 1; 1 2].
- det(A − λI) = (2 − λ)² − 1 = 0, so λ = 1 or λ = 3.
- For λ = 3: (A − 3I)v = [−1 1; 1 −1] v = 0 gives v = (1, 1).
- For λ = 1: (A − I)v = [1 1; 1 1] v = 0 gives v = (1, −1).
Useful facts: the sum of the eigenvalues equals the trace (sum of diagonal entries), here 1 + 3 = 4; the product equals the determinant, here 1 × 3 = 3.
Cayley-Hamilton theorem
Every square matrix satisfies its own characteristic equation. For the matrix above, λ² − 4λ + 3 = 0, so
A² − 4A + 3I = 0.
Check: A² = [5 4; 4 5]; 4A = [8 4; 4 8]; 3I = [3 0; 0 3]; and 5 − 8 + 3 = 0, 4 − 4 = 0 ✓.
Use: finding the inverse. From A² − 4A + 3I = 0, multiply by A⁻¹: A − 4I + 3A⁻¹ = 0, so A⁻¹ = (4I − A) / 3 = [2 −1; −1 2] / 3. Higher powers of A can also be reduced using this equation.
Common mistakes
- Taking v = 0 as an eigenvector. It must be non-zero.
- Forgetting to check ranks before trusting a solution.
Practice questions
- Solve 2x + y = 5, x + y = 3 using matrices.
- When does a system AX = B have no solution?
- Find the eigenvalues of [3 0; 0 5].
- State the Cayley-Hamilton theorem.
- Find the eigenvalues of [1 2; 2 1].
Answers to the practice questions
- det A = 1, A⁻¹ = [1 −1; −1 2], X = [2; 1]. So x = 2 and y = 1.
- When rank A is not equal to rank of the augmented matrix [A | B].
- 3 and 5 (the diagonal entries).
- Every square matrix satisfies its own characteristic equation.
- (1 − λ)² − 4 = 0 gives λ = 3 or −1.
Sources
- Official BCA syllabus Mathematics Foundations to Computer Science I, course code CC101, Unit IV
- Kolman, Busby and Ross, Discrete Mathematical Structures, 6th edition, Pearson
