ExamJuanReview. Prepare. Pass.

Engineering Mathematics · Lesson 5 of 28

Matrices, Determinants, and Systems of Equations

From matrix arithmetic to determinants, inverses, Cramer's rule, Gaussian elimination, and a first look at eigenvalues, the linear-algebra toolkit that solves the simultaneous equations behind structural stiffness, statics, and survey adjustments.

15 min read · Super EaFree lesson

Linear algebra is the language of simultaneous equations, and on the CELE it turns up wherever more than one unknown appears at once: the joint equations of a truss, the stiffness relations of a frame, the normal equations of a least-squares survey adjustment. A matrix is just a rectangular array of numbers that packages those equations, and a small set of operations, determinants, inverses, Cramer's rule, Gaussian elimination, and eigenvalues, lets you solve and analyze them mechanically. This lesson carries every operation all the way to a finished number so you can check your own habits against it.

Matrix basics and operations

A matrix is a rectangular array of numbers arranged in rows and columns. Its order (or dimensions) is written m x n, meaning m rows and n columns, and the entry in row i and column j is called a-i-j. Two matrices are equal only when they share the same order and every matching entry agrees.

Anatomy of a 3 by 3 matrix and the address of each entry a-i-j col 1 col 2 col 3 row 1 row 2 row 3 2 -1 3 0 4 5 1 0 6
Every entry has an address a-i-j, where i is its row and j is its column; here a-1-2 = -1 sits in row 1, column 2. Determinants and inverses are defined only for square matrices like this 3 by 3.

The core operations follow a few rules:

  • Addition and subtraction are entrywise and require the same order: (A + B)-i-j = a-i-j + b-i-j.
  • Scalar multiplication multiplies every entry by the scalar k: (kA)-i-j = k times a-i-j.
  • Matrix multiplication AB is defined only when the number of columns of A equals the number of rows of B. If A is m x n and B is n x p, then AB is m x p, and its entry (i, j) is the sum of products of row i of A with column j of B. Order matters: in general AB is not equal to BA.
  • Transpose A^T swaps rows and columns, so (A^T)-i-j = a-j-i; an m x n matrix becomes n x m.

Worked example (multiplication): For A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]], entry (1,1) = (1)(5) + (2)(7) = 5 + 14 = 19, entry (1,2) = (1)(6) + (2)(8) = 22, entry (2,1) = (3)(5) + (4)(7) = 43, and entry (2,2) = (3)(6) + (4)(8) = 50. So AB = [[19, 22], [43, 50]]. Multiplying entry by entry instead of row by column is the classic slip.

Special matrix Definition Why it matters
Square equal number of rows and columns (n x n) determinants, inverses, and eigenvalues are defined only here
Identity I 1 on the main diagonal, 0 elsewhere A I = I A = A, the matrix version of the number 1
Transpose A^T rows and columns swapped (A^T)-i-j = a-j-i
Symmetric A = A^T structural stiffness matrices are symmetric
Singular determinant equals 0 has no inverse; its equations are dependent

Determinants of 2x2 and 3x3

The determinant is a single number, written det(A) or |A|, computed only for a square matrix; it tells you at a glance whether the matrix is invertible (nonzero) or singular (zero). For a 2 by 2 matrix [[a, b], [c, d]], the determinant is the main-diagonal product minus the anti-diagonal product:

det = ad - bc

The 2 by 2 determinant equals ad minus bc a b c d + - det = ad - bc
For a 2 by 2 matrix the determinant is the main-diagonal product ad (solid arrow, counted plus) minus the anti-diagonal product bc (dashed arrow, counted minus): det = ad - bc.

For a 3 by 3 matrix, use cofactor expansion (also called Laplace expansion) along any row or column. Pick a row, and for each entry multiply it by the 2 by 2 determinant of the entries left over after crossing out that entry's row and column (its minor), then attach the checkerboard sign (-1)^(i+j). Expanding along the first row:

det = a-1-1 (M-1-1) - a-1-2 (M-1-2) + a-1-3 (M-1-3)

where each M is the 2 by 2 minor. The alternating + - + signs across the top row are the part people forget.

Worked example (3x3): Take the matrix from the figure above, [[2, -1, 3], [0, 4, 5], [1, 0, 6]]. Expanding along row 1:

det = 2 times det[[4, 5], [0, 6]] minus (-1) times det[[0, 5], [1, 6]] plus 3 times det[[0, 4], [1, 0]] = 2(4 times 6 - 5 times 0) + 1(0 times 6 - 5 times 1) + 3(0 times 0 - 4 times 1) = 2(24) + 1(-5) + 3(-4) = 48 - 5 - 12 = 31.

So det = 31. Dropping the alternating sign on the middle term would give 48 + 5 - 12 = 41, a common wrong answer.

The inverse of a matrix

The inverse A^-1 is the matrix that undoes A: A times A^-1 = A^-1 times A = I. It exists only when det(A) is not zero; a matrix with det = 0 is singular and has no inverse, because the inverse formula divides by the determinant. For a 2 by 2 matrix [[a, b], [c, d]]:

A^-1 = (1 / (ad - bc)) times [[d, -b], [-c, a]]

In words: swap the two main-diagonal entries, negate the other two, and divide the whole matrix by the determinant.

Worked example: For A = [[4, 7], [2, 6]], first det = (4)(6) - (7)(2) = 24 - 14 = 10, which is nonzero, so an inverse exists. Then A^-1 = (1/10) times [[6, -7], [-2, 4]]. Check by multiplying: A times A^-1 = (1/10) times [[(4)(6) + (7)(-2), (4)(-7) + (7)(4)], [(2)(6) + (6)(-2), (2)(-7) + (6)(4)]] = (1/10) times [[10, 0], [0, 10]] = [[1, 0], [0, 1]] = I, as required. Once you have A^-1, any system A x = b solves in one step as x = A^-1 b.

Cramer's rule

Cramer's rule solves a square system A x = b using only determinants, which makes it fast for 2 by 2 and 3 by 3 systems. Let D = det(A). To find the unknown in column i, replace column i of A with the constant vector b, take that determinant D-i, and divide:

x-i = D-i / D

Cramer's rule: replace one column with the constants, then divide determinants A col1 col2 col3 col2 to b A2 col1 b col3 x2 = det(A2) / det(A)
To solve for the second unknown by Cramer's rule, replace column 2 of the coefficient matrix A with the constant vector b to form A2 (shaded column), then divide: x2 = det(A2) / det(A).

Worked example: Solve 3x + 2y = 16 and 2x - y = -1. The coefficient matrix is A = [[3, 2], [2, -1]], so D = (3)(-1) - (2)(2) = -3 - 4 = -7. Replace the x-column with the constants to get D-x = det[[16, 2], [-1, -1]] = (16)(-1) - (2)(-1) = -16 + 2 = -14, and replace the y-column to get D-y = det[[3, 16], [2, -1]] = (3)(-1) - (16)(2) = -3 - 32 = -35. Then x = D-x / D = -14 / -7 = 2 and y = D-y / D = -35 / -7 = 5. Check in equation 2: 2(2) - 5 = -1, correct. If D had come out 0, Cramer's rule would not apply and the system would have either no solution or infinitely many.

Solving linear systems by Gaussian elimination

Cramer's rule is neat for small systems, but Gaussian elimination scales to any size and is what you reach for on a 3 by 3 or larger system. Write the system as an augmented matrix, then use elementary row operations (swap two rows, multiply a row by a nonzero constant, or add a multiple of one row to another) to reach an upper-triangular form. Then back-substitute from the bottom row upward.

Worked example: Solve the system

  • (1) x + y + z = 6
  • (2) 2x - y + z = 3
  • (3) x + 2y - z = 2

Eliminate x from rows 2 and 3 using row 1. Row 2 becomes Row 2 - 2(Row 1): (2 - 2)x + (-1 - 2)y + (1 - 2)z = 3 - 12, giving -3y - z = -9. Row 3 becomes Row 3 - Row 1: (1 - 1)x + (2 - 1)y + (-1 - 1)z = 2 - 6, giving y - 2z = -4. Now back-substitute: from y - 2z = -4 we get y = 2z - 4, and substituting into -3y - z = -9 gives -3(2z - 4) - z = -9, so -6z + 12 - z = -9, then -7z = -21 and z = 3. Then y = 2(3) - 4 = 2, and finally x = 6 - y - z = 6 - 2 - 3 = 1. The solution is (x, y, z) = (1, 2, 3).

Method Best when Key limitation
Cramer's rule small 2 x 2 or 3 x 3 systems fails if D = 0; grows very slow for large n
Matrix inverse, x = A^-1 b you must reuse A^-1 for several b vectors fails if det(A) = 0
Gaussian elimination any size, especially 3 x 3 and larger needs careful bookkeeping of row operations

If the coefficient determinant D equals 0 the system does not have a unique solution: it is inconsistent (no solution) when a numerator determinant is nonzero, and it has infinitely many solutions when all of them are zero.

A brief look at eigenvalues

Some square matrices have special directions that they only stretch, never rotate. A nonzero vector v is an eigenvector of A with eigenvalue lambda when A v = lambda v. Rearranging gives (A - lambda I) v = 0, and a nonzero v can exist only if the matrix A - lambda I is singular, so the eigenvalues are the roots of the characteristic equation:

det(A - lambda I) = 0

Worked example: For A = [[2, 1], [1, 2]], form A - lambda I = [[2 - lambda, 1], [1, 2 - lambda]]. Its determinant is (2 - lambda)^2 - (1)(1) = 0, so (2 - lambda)^2 = 1 and 2 - lambda = +/- 1. That gives lambda = 1 or lambda = 3. Two quick checks confirm the roots: the sum 1 + 3 = 4 equals the trace (the sum of the main-diagonal entries, 2 + 2), and the product (1)(3) = 3 equals det(A) = (2)(2) - (1)(1) = 3.

Eigenvalues are not just algebra for its own sake in civil engineering. They set the critical buckling loads of columns (an eigenvalue problem on the stiffness matrix), the natural frequencies of a structure in modal analysis (where the square roots of eigenvalues give the vibration frequencies), and the principal stresses and their directions at a point (the eigenvalues and eigenvectors of the stress matrix). The same solving skills, determinants and simultaneous equations, sit underneath all three.

Exam-day strategy

  • Confirm the orders before multiplying: AB is defined only when the columns of A match the rows of B, and the answer takes the outer dimensions; remember AB is generally not BA.
  • Compute the determinant first on any inverse, Cramer, or "how many solutions" item; a zero determinant means singular, no inverse, and no unique solution, which often answers the question immediately.
  • On a 3 by 3 determinant, write the checkerboard signs + - + across your chosen row before you expand; the sign on the middle term is the single most common mistake.
  • For a 2 by 2 inverse, swap the main diagonal, negate the off-diagonal, and divide by det; skipping the division by the determinant is a frequent slip.
  • Use Cramer's rule for a quick 2 by 2 or 3 by 3, but switch to Gaussian elimination once the system is 3 by 3 with messy numbers or larger; it is faster and less error-prone by hand.
  • Sanity-check eigenvalues with the two shortcuts: the eigenvalues must sum to the trace and multiply to the determinant.

Marking it done updates your Exam-Ready progress.

Lesson quiz

Check you actually have it

20 items on this lesson alone, randomized each try, with the reasoning on every answer.

Matrices, Determinants, and Systems of Equations: quick check

Item 01 / 20 · Score 0

Eigenvalue computation

What are the eigenvalues of A = [[2, 1], [1, 2]]?

This whole first section is free

Read every lesson in Engineering Mathematics and take its quizzes free. The full CELE reviewer unlocks the other 5 subjects, all section tests, and the timed mock exams — one payment, lifetime access, ₱399.

Unlock the full reviewer