This is the largest and most foundational unit on linear algebra in the book. A matrix is simply an organized rectangular array of numbers, and this unit builds the full toolkit around it: the four basic matrix operations (addition, subtraction, scalar multiplication, and multiplication), and determinants — computed through minors and cofactors — which unlock the adjoint, the inverse of a matrix, and Cramer's Rule for solving systems of equations.
The unit also covers elementary row operations, echelon and reduced echelon forms, using row operations to find both the inverse and the rank of a matrix, and how to tell a consistent system of linear equations from an inconsistent one. It closes with homogeneous systems of equations (which always have at least the trivial all-zero solution) solved by Gaussian elimination, and two real-world applications: using transformation matrices to reflect shapes in computer graphics, and using matrix multiplication and inversion to encode and decode secret messages in cryptography.
Learning Objectives
- Define a matrix and identify its order, rows, columns, and special types (row, column, square, diagonal, scalar, identity, null)
- Find the transpose of a matrix
- Add, subtract, and scalar-multiply matrices
- Multiply two matrices when they are conformable for multiplication
- Evaluate the determinant of a 3×3 matrix using minors and cofactors
- Apply the key properties of determinants to evaluate them without full expansion
- Find the adjoint of a matrix and use it to find the inverse of a non-singular matrix
- Apply elementary row operations to reduce a matrix to echelon and reduced echelon form
- Find the inverse and the rank of a matrix using row operations
- Distinguish between consistent and inconsistent systems of linear equations
- Solve systems of non-homogeneous linear equations using reduced echelon form, matrix inversion, and Cramer's Rule
- Solve systems of homogeneous linear equations by Gaussian elimination, and apply matrices to real-world reflection and cryptography problems
Key Concepts
4.1 Matrices: Definitions and Special Types
A matrix is a rectangular array of numbers arranged in rows and columns and enclosed in brackets. A matrix with m rows and n columns has order m by n, and the element in row i and column j is written a_ij. A matrix with only one row (1xn) is a row matrix, and one with only one column (mx1) is a column matrix. If the number of rows does not equal the number of columns, it is a rectangular matrix; if they are equal, it is a square matrix.
In a square matrix, the entries a11, a22, …, ann form the principal (main) diagonal. A diagonal matrix has every off-diagonal entry equal to zero; a scalar matrix is a diagonal matrix whose diagonal entries are all the same non-zero number; and the identity (unit) matrix I has every diagonal entry equal to 1 and every off-diagonal entry equal to 0. A null (zero) matrix has every entry equal to 0. Two matrices are equal if they have the same order and every corresponding entry matches. The transpose of a matrix A, written A^t, is formed by interchanging its rows and columns.
4.2 Matrix Operations
Addition and subtraction of matrices are defined entry-by-entry, and are only possible when both matrices have the exact same order. Scalar multiplication kA multiplies every single entry of A by the number k, so kA always has the same order as A.
Matrix multiplication AB is defined only when the number of columns of A equals the number of rows of B; each entry of the product is the sum of the products of a row of A with a column of B. Matrix multiplication is NOT commutative in general — AB is usually not equal to BA — although it is associative, A(BC)=(AB)C, and distributes over addition, A(B+C)=AB+AC.
4.3 Determinants: Minors, Cofactors, and Expansion
For a square matrix, the minor M_ij of an element a_ij is the determinant left after deleting that element's row and column; the cofactor A_ij attaches a sign to the minor, A_ij = (-1)^(i+j) * M_ij.
The determinant of a 3×3 matrix is found by cofactor expansion along any row or column: multiply each entry in that row (or column) by its own cofactor, and add the results — the same value results no matter which row or column is chosen. Several properties make many determinants easy to evaluate without full expansion: interchanging two rows or columns negates the determinant; two identical rows or columns make the determinant zero; and the determinant of a triangular matrix is simply the product of its diagonal entries.
4.4 Adjoint and Inverse of a Matrix
The adjoint of a matrix A, written adj(A), is formed by first building the matrix of cofactors of A (replacing every entry with its own cofactor), then taking the transpose of that cofactor matrix.
For a non-singular matrix A (one where |A| is not equal to 0), the inverse is A^-1 = (1/|A|) * adj(A). This satisfies A * A^-1 = A^-1 * A = I, the identity matrix; a matrix with |A| = 0 (a singular matrix) has no inverse at all.
4.5 Elementary Row Operations, Echelon Form, and Rank
Three elementary row operations transform a matrix into an equivalent matrix without changing the solution of the system it represents: interchanging two rows, multiplying a row by a non-zero number, and adding a multiple of one row to another. A matrix is in echelon form when each row's leading (first non-zero) entry is 1, later rows have more leading zeros than earlier ones, and any all-zero rows sit at the bottom.
Applying row operations to the combined matrix [A | I] until the left half becomes I turns the right half into A^-1, giving [I | A^-1]. The rank of a matrix is the number of non-zero rows once it has been reduced to echelon form — a useful, purely mechanical way to measure how much genuinely independent information a matrix contains.
4.6 Systems of Non-Homogeneous Linear Equations
A system of equations is consistent if it has a unique solution or infinitely many solutions, and inconsistent if it has no solution at all. Comparing the rank of the coefficient matrix to the rank of the augmented matrix (and to the number of variables) tells you which case applies: equal ranks equal to the number of variables gives a unique solution; equal ranks less than the number of variables gives infinitely many solutions; and unequal ranks means the system has no solution.
Three methods solve such a system: reducing the augmented matrix to reduced echelon form and reading off the solution (using back substitution if a variable is left arbitrary); the matrix inversion method, X = A^-1 B (valid only when |A| is not equal to 0); and Cramer's Rule, which finds each variable as a ratio of two determinants — the denominator is always |A|, and the numerator is the determinant of A with the corresponding column replaced by the constants column B.
4.7 Systems of Homogeneous Linear Equations
A homogeneous system (every constant term equal to 0) is always consistent, because it is always satisfied by the trivial solution, where every variable equals zero. Any other solution is called a non-trivial solution.
Gaussian elimination solves such a system by reducing the augmented matrix to echelon form and then using back substitution. If the rank of the coefficient matrix equals the number of variables, the system has ONLY the trivial solution; if the rank is less than the number of variables, the system also has infinitely many non-trivial solutions.
4.8 Real-World Applications
A transformation (reflection) matrix reflects a point across an axis or line when it multiplies the point's coordinates written as a column vector. The matrix [[1,0],[0,-1]] reflects across the x-axis, [[-1,0],[0,1]] reflects across the y-axis, and [[0,1],[1,0]] reflects across the line y=x.
In cryptography, a message is converted into numbers (A=1, B=2, …, Z=26), grouped into column vectors, and multiplied by an encoding matrix to encrypt it; multiplying the coded matrix by the encoding matrix's inverse decodes it back to the original message. This is a direct, practical use of matrix multiplication and matrix inversion outside of pure algebra.
Important Definitions
What is a matrix?
A rectangular array of numbers arranged in rows and columns, enclosed in brackets.
What is the order of a matrix?
If a matrix has m rows and n columns, its order is written m by n (m x n).
What is a square matrix?
A matrix in which the number of rows equals the number of columns.
What is the transpose of a matrix?
The matrix obtained by interchanging the rows and columns of the original matrix, denoted A^t.
What is an identity (unit) matrix?
A square matrix with 1s on the principal diagonal and 0s everywhere else, denoted I.
What is the minor of an element of a matrix?
The determinant formed by deleting the row and column containing that element.
What is the cofactor of an element a_ij?
A_ij = (-1)^(i+j) times the minor M_ij of that element.
What is a non-singular matrix?
A square matrix whose determinant is not equal to zero, meaning its inverse exists.
What is the rank of a matrix?
The number of non-zero rows when the matrix is reduced to echelon form.
What is the trivial solution of a homogeneous system?
The solution where every variable equals zero, which always satisfies a homogeneous system.
Key Facts and Relations
| Topic | Key Fact / Relation |
|---|---|
| Order of a matrix | m rows x n columns, written m x n |
| Matrix addition/subtraction | Entrywise; requires both matrices to have the same order |
| Scalar multiplication | kA = [k * a_ij] |
| Matrix multiplication condition | Columns of A must equal rows of B |
| Cofactor | A_ij = (-1)^(i+j) * M_ij |
| Determinant of a 3×3 matrix | Expand along any row or column: sum of (entry x its cofactor) |
| Adjoint | adj(A) = transpose of the matrix of cofactors of A |
| Inverse via adjoint | A^-1 = (1/|A|) * adj(A), valid only if |A| is not 0 |
| Rank | Number of non-zero rows once the matrix is reduced to echelon form |
| Cramer's Rule | x_i = |A_i| / |A|, where A_i replaces column i of A with B |
| Matrix inversion method | X = A^-1 * B (solves AX = B) |
| Consistency rule | Equal ranks = number of variables: unique solution. Equal ranks < variables: infinite solutions. Unequal ranks: no solution |
| Homogeneous system rule | rank(A) = variables: trivial solution only. rank(A) < variables: non-trivial solutions exist too |
Diagrams
Matrix Multiplication: Row Times Column: A schematic showing a 2×3 matrix A and a 3×2 matrix B, with row 2 of A and column 1 of B highlighted, illustrating that the entry c21 of the product AB is formed by multiplying corresponding entries of that row and column and adding the results

Three Methods to Solve a System of Linear Equations: A flow diagram showing a system AX=B branching into three solution methods — reduced echelon form, matrix inversion, and Cramer's Rule — each converging on the same final solution (x, y, z)

Reflecting a Triangle Over the y-axis: A coordinate-plane plot of a triangle with vertices A(1,2), B(4,1), C(2,5) alongside its reflection A'(-1,2), B'(-4,1), C'(-2,5) across the y-axis, produced by multiplying each vertex by the transformation matrix [[-1,0],[0,1]]

Solved Examples
Example 1: Matrix Addition, Subtraction, and Scalar Multiplication
Problem: If A = [[2,-1],[0,3]] and B = [[1,4],[-2,5]], find A+B, A-B, and 3A.
- A+B: add corresponding entries — [[2+1, -1+4], [0+(-2), 3+5]] = [[3, 3], [-2, 8]].
- A-B: subtract corresponding entries — [[2-1, -1-4], [0-(-2), 3-5]] = [[1, -5], [2, -2]].
- 3A: multiply every entry of A by 3 — [[6, -3], [0, 9]].
- Final answer: A+B = [[3,3],[-2,8]], A-B = [[1,-5],[2,-2]], 3A = [[6,-3],[0,9]].
Example 2: Matrix Multiplication
Problem: If A = [[1,2],[3,4]] and B = [[2,0],[1,3]], find AB.
- Entry (1,1): row 1 of A times column 1 of B — 1*2 + 2*1 = 4.
- Entry (1,2): row 1 of A times column 2 of B — 1*0 + 2*3 = 6.
- Entry (2,1): row 2 of A times column 1 of B — 3*2 + 4*1 = 10.
- Entry (2,2): row 2 of A times column 2 of B — 3*0 + 4*3 = 12.
- Final answer: AB = [[4, 6], [10, 12]].
Example 3: Evaluating a 3×3 Determinant by Cofactor Expansion
Problem: Evaluate |A| for A = [[2,-1,3],[0,2,-4],[1,3,1]] by expanding along the first row.
- Minor M11 = |[2,-4],[3,1]| = (2)(1)-(-4)(3) = 2+12 = 14. Cofactor A11 = (+1)(14) = 14.
- Minor M12 = |[0,-4],[1,1]| = (0)(1)-(-4)(1) = 4. Cofactor A12 = (-1)(4) = -4.
- Minor M13 = |[0,2],[1,3]| = (0)(3)-(2)(1) = -2. Cofactor A13 = (+1)(-2) = -2.
- |A| = a11*A11 + a12*A12 + a13*A13 = (2)(14) + (-1)(-4) + (3)(-2) = 28+4-6 = 26.
- Final answer: |A| = 26.
Example 4: Finding the Inverse Using the Adjoint
Problem: Find A^-1 for A = [[1,2,0],[0,1,3],[1,0,2]] using the adjoint method.
- Compute |A| by expanding along row 1: |A| = 1(1*2-3*0) – 2(0*2-3*1) + 0(0*0-1*1) = 1(2) – 2(-3) + 0 = 2+6 = 8. Since |A| is not 0, A is non-singular.
- Compute all 9 cofactors: A11=2, A12=3, A13=-1, A21=-4, A22=2, A23=2, A31=6, A32=-3, A33=1.
- adj(A) = transpose of the cofactor matrix = [[2,-4,6], [3,2,-3], [-1,2,1]].
- A^-1 = (1/|A|) * adj(A) = (1/8) * [[2,-4,6], [3,2,-3], [-1,2,1]].
- Final answer: A^-1 = (1/8)[[2,-4,6],[3,2,-3],[-1,2,1]].
Example 5: Finding the Rank of a Matrix
Problem: Find the rank of the matrix [[1,2,-1],[2,4,-2],[1,1,1]] by reducing it to echelon form.
- Apply R2 -> R2-2R1: [2-2, 4-4, -2+2] = [0,0,0]. The matrix becomes [[1,2,-1],[0,0,0],[1,1,1]].
- Apply R3 -> R3-R1: [1-1, 1-2, 1+1] = [0,-1,2]. The matrix becomes [[1,2,-1],[0,0,0],[0,-1,2]].
- Swap R2 and R3 so the all-zero row sits at the bottom (as required for echelon form): [[1,2,-1],[0,-1,2],[0,0,0]].
- The number of non-zero rows is 2.
- Final answer: rank = 2.
Example 6: Solving a System by Cramer's Rule
Problem: Solve x+y+z=6, 2x-y+z=3, x+2y-z=2 using Cramer's Rule.
- Write A = [[1,1,1],[2,-1,1],[1,2,-1]] and B = [6,3,2]. Compute |A| = 1(1-2) – 1(-2-1) + 1(4+1) = -1+3+5 = 7 (non-zero, so Cramer's Rule applies).
- Replace column 1 of A with B to get Ax; expanding gives |Ax| = 7, so x = |Ax|/|A| = 7/7 = 1.
- Replace column 2 of A with B to get Ay; expanding gives |Ay| = 14, so y = |Ay|/|A| = 14/7 = 2.
- Replace column 3 of A with B to get Az; expanding gives |Az| = 21, so z = |Az|/|A| = 21/7 = 3.
- Check: x+y+z=6, 2x-y+z=2-2+3=3, x+2y-z=1+4-3=2 — all three original equations are satisfied.
- Final answer: x=1, y=2, z=3.
Example 7: Solving a Homogeneous System by Gaussian Elimination
Problem: Solve x+y+z=0, 2x-y+z=0, x+4y+2z=0 by Gaussian elimination, and state whether the system has only the trivial solution.
- Row reduce the augmented matrix (all constants are 0): R2 -> R2-2R1 gives [0,-3,-1 | 0]; R3 -> R3-R1 gives [0,3,1 | 0].
- Add the new R2 to R3: R3 -> R3+R2 gives [0,0,0 | 0], an all-zero row.
- The matrix is now in echelon form with only 2 non-zero rows, so rank(A) = 2, which is LESS than the number of variables (3).
- By the rank rule for homogeneous systems, this means the system has non-trivial solutions, not just the trivial one.
- Back substitution: from row 2, -3y-z=0 so z=-3y; from row 1, x+y+z=0 so x=2y. Letting y=t gives x=2t, y=t, z=-3t for any real t.
- Final answer: infinitely many non-trivial solutions, (x,y,z) = (2t, t, -3t) for any real t.
Example 8: Application: Reflecting a Shape with a Transformation Matrix
Problem: A triangle has vertices A(1,2), B(4,1), C(2,5). Find the vertices of the triangle reflected over the y-axis using a transformation matrix.
- The transformation matrix for reflection over the y-axis is [[-1,0],[0,1]].
- A' = [[-1,0],[0,1]] * [1,2] = [-1, 2], giving A'(-1, 2).
- B' = [[-1,0],[0,1]] * [4,1] = [-4, 1], giving B'(-4, 1).
- C' = [[-1,0],[0,1]] * [2,5] = [-2, 5], giving C'(-2, 5).
- Final answer: A'(-1,2), B'(-4,1), C'(-2,5).
Short Questions & Answers
What is the order of a matrix with 3 rows and 5 columns?
3 x 5.
What is the transpose of a matrix?
The matrix obtained by interchanging its rows and columns.
When are two matrices conformable for multiplication?
When the number of columns of the first matrix equals the number of rows of the second matrix.
What is the cofactor of an element a_ij?
A_ij = (-1)^(i+j) times the minor of a_ij.
What condition must |A| satisfy for A^-1 to exist?
|A| must not equal zero — that is, A must be non-singular.
What is the rank of a matrix?
The number of non-zero rows when the matrix is reduced to echelon form.
What is the trivial solution of a homogeneous system?
The solution where every variable equals zero.
Long Questions & Answers
Explain how the determinant of a 3×3 matrix is evaluated using cofactor expansion, and how the adjoint is used to find the inverse of a non-singular matrix.
What is the minor and the cofactor of an element of a matrix?
The minor M_ij of an element a_ij is the determinant obtained by deleting the ith row and jth column of the matrix; the cofactor A_ij is the minor with a sign attached, A_ij = (-1)^(i+j) * M_ij.
How is the determinant of a 3×3 matrix computed using cofactor expansion?
Choose any row or column, multiply each entry in it by its own cofactor, and add the results; expanding along the first row gives |A| = a11*A11 + a12*A12 + a13*A13, and the same value results no matter which row or column is chosen.
What is the adjoint of a matrix, and how is it formed?
The adjoint, adj(A), is formed by first building the matrix of cofactors of A (replacing every entry with its own cofactor), then taking the transpose of that cofactor matrix.
How is the inverse of a non-singular matrix found using the adjoint?
For a matrix A with |A| not equal to 0 (non-singular), the inverse is A^-1 = (1/|A|) * adj(A); this satisfies A*A^-1 = A^-1*A = I, the identity matrix.
Describe the three methods for solving a system of non-homogeneous linear equations, and explain how the rank of a matrix determines whether a homogeneous system has only the trivial solution.
How is a system of equations solved using reduced echelon form?
Write the system as an augmented matrix, apply elementary row operations until the matrix reaches reduced echelon form, and read the solution directly from the resulting simplified equations, using back substitution if any variable is left arbitrary.
How is a system of equations solved using the matrix inversion method?
Write the system as AX=B, find A^-1 (provided |A| is not equal to 0), and compute X=A^-1 B to get the values of all the variables at once.
How does Cramer's Rule solve a system of equations?
Each variable x_i is found as the ratio of two determinants: the denominator is always |A|, and the numerator is the determinant of A with its ith column replaced by the constants column B.
How does the rank of the coefficient matrix determine whether a homogeneous system has only the trivial solution?
If the rank of the coefficient matrix equals the number of variables, the system has only the trivial (all-zero) solution; if the rank is less than the number of variables, the system has infinitely many non-trivial solutions as well.
Multiple Choice Questions (MCQs)
The order of a matrix with 2 rows and 4 columns is: (A) 4 x 2 (B) 2 x 4 (C) 8 x 1 (D) 2 x 2
Correct answer: (B) 2 x 4. Order is written as (number of rows) x (number of columns), so 2 x 4.
The transpose of a matrix is formed by: (A) Adding a row of zeros (B) Interchanging rows and columns (C) Multiplying by -1 (D) Deleting the last row
Correct answer: (B) Interchanging rows and columns. The transpose A^t is obtained by interchanging the rows and columns of A.
Two matrices can be multiplied only if: (A) They have the same order (B) The columns of the first equal the rows of the second (C) They are both square (D) They are both diagonal
Correct answer: (B) The columns of the first equal the rows of the second. Matrix multiplication AB requires the number of columns of A to equal the number of rows of B.
The cofactor of an element a_ij is: (A) Its minor only (B) (-1)^(i+j) times its minor (C) Its minor times -1 always (D) The element itself
Correct answer: (B) (-1)^(i+j) times its minor. The cofactor attaches an alternating sign to the minor: A_ij = (-1)^(i+j) * M_ij.
A square matrix A has an inverse only if: (A) |A| = 0 (B) |A| is not equal to 0 (C) A is diagonal (D) A is symmetric
Correct answer: (B) |A| is not equal to 0. A matrix is non-singular (invertible) only when its determinant is not equal to zero.
The rank of a matrix is: (A) The number of rows (B) The number of non-zero rows in echelon form (C) The determinant value (D) The number of columns
Correct answer: (B) The number of non-zero rows in echelon form. Rank is defined as the number of non-zero rows once the matrix is reduced to echelon form.
Cramer's Rule finds each variable as: (A) A sum of two determinants (B) The ratio of two determinants (C) The product of two determinants (D) A single determinant
Correct answer: (B) The ratio of two determinants. Cramer's Rule computes x_i = |A_i| / |A|, a ratio of two determinants.
A homogeneous system of equations is always: (A) Inconsistent (B) Consistent (satisfied by the trivial solution) (C) Undefined (D) Non-linear
Correct answer: (B) Consistent (satisfied by the trivial solution). A homogeneous system is always consistent because the trivial (all-zero) solution always satisfies it.
A homogeneous system has only the trivial solution when: (A) rank(A) < number of variables (B) rank(A) = number of variables (C) rank(A) = 0 (D) |A| = 0 always
Correct answer: (B) rank(A) = number of variables. Only the trivial solution exists when the rank of the coefficient matrix equals the number of variables.
To reflect a point over the x-axis using a transformation matrix, multiply it by: (A) [[1,0],[0,-1]] (B) [[-1,0],[0,1]] (C) [[0,1],[1,0]] (D) [[1,1],[1,1]]
Correct answer: (A) [[1,0],[0,-1]]. The matrix [[1,0],[0,-1]] keeps x unchanged and negates y, reflecting across the x-axis.
Quick Revision Summary
- A matrix is a rectangular array of numbers with order m x n (m rows, n columns)
- The transpose A^t is formed by interchanging rows and columns
- Matrix addition/subtraction requires the same order; multiplication requires columns of A = rows of B
- Matrix multiplication is NOT commutative in general: AB is not equal to BA
- Cofactor: A_ij = (-1)^(i+j) x minor M_ij
- Determinant of a 3×3 matrix: expand along any row or column, using entries x their cofactors
- adj(A) = transpose of the cofactor matrix; A^-1 = (1/|A|) adj(A), valid only when |A| is not 0
- Row operations reduce a matrix to echelon form; rank = number of non-zero rows in echelon form
- A system is consistent (unique or infinite solutions) or inconsistent (no solution), based on comparing ranks
- Three methods to solve AX=B: reduced echelon form, matrix inversion X=A^-1B, and Cramer's Rule
- A homogeneous system is always consistent; rank(A) = variables gives only the trivial solution, rank(A) < variables gives non-trivial solutions too
- Matrices model real transformations: reflections in graphics, and encoding/decoding messages in cryptography
Exam Tips
- Always double-check matrix order before adding, subtracting, or multiplying — mismatched orders mean the operation is undefined
- When expanding a 3×3 determinant, pick the row or column with the most zeros to minimize calculation
- Remember AB is generally not equal to BA — never assume matrix multiplication commutes
- After finding an inverse, spot-check by multiplying A times A^-1 to confirm you get the identity matrix
- In Cramer's Rule, compute |A| first — if it is zero, the rule cannot be used at all
- For homogeneous systems, always compare the rank of A to the number of variables to decide trivial vs non-trivial solutions