Matrices
Easy Overview
Imagine a spreadsheet full of numbers arranged in rows and columns — that's a matrix. Boring on its own, but crazy powerful when you use it to solve equations, rotate 3D objects in games, or even run AI algorithms. This chapter teaches you how to handle these number tables like a pro.
What is a Matrix?
A matrix is just a rectangular arrangement of numbers in rows and columns. Think of it like a train timetable — rows for trains, columns for departure times. We say a matrix has order m × n (rows × columns). A 2×3 matrix has 2 rows and 3 columns. Simple.
Types of Matrices
Square matrix = same rows and columns (like a chessboard). Row matrix = just one row. Column matrix = just one column. Zero matrix = all entries are zero — the boring one. Identity matrix = 1s on the diagonal and 0s everywhere else. Think of identity like the number 1 for matrices.
Matrix Addition and Scalar Multiplication
Adding matrices is easy — just add matching entries. But they need to be the same size! Like adding two trays of eggs — you match position to position. Scalar multiplication just means multiply every entry by the same number. So 2A doubles every element in A.
Matrix Multiplication — The Tricky One
This is where most people get confused. You can multiply two matrices only if the first one's columns match the second one's rows. The resulting matrix has size (first rows) × (second columns). Think of it like a vending machine: the row from the first matrix is the payment method, the column from the second is what you get. Each entry is the dot product of a row from the first and a column from the second.
Inverse of a Matrix
The inverse of a matrix A (written A⁻¹) is like the 'undo' button. A × A⁻¹ = Identity matrix. For a 2×2 matrix, there's a formula: swap the diagonal, negate the off-diagonal, divide by the determinant. But if the determinant is zero? No inverse exists — that matrix is 'singular'. Dead end.
Solving Equations Using Matrices
Got a system of equations? Write it as AX = B, where A is the coefficient matrix, X is the variable matrix, and B is the constants. Then X = A⁻¹B. BOOM — solved in one shot. It's like having a master key for all linear equations.
Key Points
- •Order of matrix = rows × columns (m × n)
- •Matrix addition needs same order — add element by element
- •For multiplication: columns of first must equal rows of second
- •Identity matrix I acts like 1 for matrices
- •A⁻¹ exists only if determinant ≠ 0
- •For 2×2 matrix [a b; c d], A⁻¹ = 1/(ad−bc) [d −b; −c a]
- •Use AX = B → X = A⁻¹B to solve system of equations
Practice Questions
- If A = [2 3; 1 −4] and B = [0 1; 2 5], find AB and BA. Is AB = BA?
- Find the inverse of matrix [3 1; 5 2].
- Solve the system using matrices: 2x + y = 7, 3x − 4y = 5.
- If A = [1 2; 3 4], show that A(adj A) = |A| I.