By the end of this chapter, you will be able to:
Mastering these skills will help you solve complex problems efficiently, making you confident in handling real-world technical challenges.
Compiled by: Simon Githaiga
Matrix calculations are essential tools in civil engineering for solving systems of linear equations, transforming coordinate systems, and modeling structural behavior. Determinants and inverses of matrices allow engineers to analyze and manipulate these systems efficiently. This chapter focuses on calculating determinants and inverses for matrices commonly used in civil engineering contexts in Kenya, providing thorough worked examples for practical understanding.
Determinants provide a scalar value associated with a square matrix that helps determine whether the matrix is invertible. In civil engineering, this is crucial when solving simultaneous equations for forces in structures or when performing coordinate transformations. The inverse of a matrix, when it exists, is used to solve matrix equations such as \(AX = B\), where \(A\) and \(B\) are known matrices, and \(X\) is the unknown matrix to be found. Understanding how to compute determinants and inverses is fundamental for structural analysis, geotechnical modeling, and other engineering computations.
The determinant is a scalar value calculated from a square matrix that reflects properties such as matrix invertibility and the scaling factor of linear transformations. For a matrix \(A\), the determinant is denoted \(\det(A)\) or \(|A|\), and it is defined only for square matrices.
For a \(2 \times 2\) matrix
\[
A = \begin{bmatrix} a & b \\ c & d \end{bmatrix},
\]
the determinant is
\[
\det(A) = ad - bc.
\]
For higher-order matrices, the determinant is calculated using expansion by minors or cofactors.
$$\text{Determinant of } A = \sum_{j=1}^n (-1)^{1+j} a_{1j} \det(M_{1j})$$
where \(M_{1j}\) is the \((n-1) \times (n-1)\) submatrix formed by deleting the first row and \(j^{th}\) column.
Example 1: Calculate the determinant of a \(2 \times 2\) matrix representing a transformation of coordinates on a small construction site.
Given:
\[
A = \begin{bmatrix} 4 & 2 \\ 3 & 5 \end{bmatrix}
\]
$$\det(A) = (4)(5) - (2)(3)$$
$$= 20 - 6$$
Answer: \(\det(A) = 14\)
Example 2: Calculate the determinant of a \(3 \times 3\) matrix representing stiffness coefficients in a structural analysis problem.
Given:
\[
B = \begin{bmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 5 & 2 & 0 \end{bmatrix}
\]
$$\det(B) = 2 \times \det\begin{bmatrix} -1 & 4 \\ 2 & 0 \end{bmatrix} - 1 \times \det\begin{bmatrix} 0 & 4 \\ 5 & 0 \end{bmatrix} + 3 \times \det\begin{bmatrix} 0 & -1 \\ 5 & 2 \end{bmatrix}$$
Calculate minors:
$$\det\begin{bmatrix} -1 & 4 \\ 2 & 0 \end{bmatrix} = (-1)(0) - (4)(2) = 0 - 8 = -8$$
$$\det\begin{bmatrix} 0 & 4 \\ 5 & 0 \end{bmatrix} = (0)(0) - (4)(5) = 0 - 20 = -20$$
$$\det\begin{bmatrix} 0 & -1 \\ 5 & 2 \end{bmatrix} = (0)(2) - (-1)(5) = 0 + 5 = 5$$
Substitute:
$$= 2 \times (-8) - 1 \times (-20) + 3 \times 5$$
$$= -16 + 20 + 15$$
$$= 19$$
Answer: \(\det(B) = 19\)
Example 3: Calculate the determinant of a \(3 \times 3\) matrix representing load distribution coefficients on a bridge deck.
Given:
\[
C = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}
\]
$$\det(C) = 1 \times \det\begin{bmatrix} 5 & 6 \\ 8 & 9 \end{bmatrix} - 2 \times \det\begin{bmatrix} 4 & 6 \\ 7 & 9 \end{bmatrix} + 3 \times \det\begin{bmatrix} 4 & 5 \\ 7 & 8 \end{bmatrix}$$
Calculate minors:
$$\det\begin{bmatrix} 5 & 6 \\ 8 & 9 \end{bmatrix} = (5)(9) - (6)(8) = 45 - 48 = -3$$
$$\det\begin{bmatrix} 4 & 6 \\ 7 & 9 \end{bmatrix} = (4)(9) - (6)(7) = 36 - 42 = -6$$
$$\det\begin{bmatrix} 4 & 5 \\ 7 & 8 \end{bmatrix} = (4)(8) - (5)(7) = 32 - 35 = -3$$
Substitute:
$$= 1 \times (-3) - 2 \times (-6) + 3 \times (-3)$$
$$= -3 + 12 - 9$$
$$= 0$$
Answer: \(\det(C) = 0\)
The inverse of a square matrix \(A\), denoted \(A^{-1}\), is a matrix such that
$$A \times A^{-1} = I$$
where \(I\) is the identity matrix of the same order. The inverse exists only if \(\det(A) \neq 0\). In civil engineering, inverses are used to solve matrix equations, such as systems of forces or displacements.
For a \(2 \times 2\) matrix
\[ A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, \]
if \(\det(A) \neq 0\), then
$$A^{-1} = \frac{1}{\det(A)} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}.$$
For larger matrices, the inverse is calculated using cofactors and adjoint matrices or by row reduction techniques.
Example 1: Find the inverse of a \(2 \times 2\) matrix representing a transformation matrix for site coordinates.
Given:
\[
A = \begin{bmatrix} 3 & 4 \\ 2 & 5 \end{bmatrix}
\]
Calculate determinant:
$$\det(A) = (3)(5) - (4)(2) = 15 - 8 = 7$$
Calculate inverse:
$$A^{-1} = \frac{1}{7} \begin{bmatrix} 5 & -4 \\ -2 & 3 \end{bmatrix}$$
$$= \begin{bmatrix} \frac{5}{7} & -\frac{4}{7} \\ -\frac{2}{7} & \frac{3}{7} \end{bmatrix}$$
Answer:
\[ A^{-1} = \begin{bmatrix} 0.714 & -0.571 \\ -0.286 & 0.429 \end{bmatrix} \]
Example 2: Find the inverse of a \(3 \times 3\) matrix representing coefficients of a load distribution system.
Given:
\[
B = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{bmatrix}
\]
Calculate determinant (using expansion):
$$\det(B) = 1 \times \det\begin{bmatrix} 1 & 4 \\ 6 & 0 \end{bmatrix} - 2 \times \det\begin{bmatrix} 0 & 4 \\ 5 & 0 \end{bmatrix} + 3 \times \det\begin{bmatrix} 0 & 1 \\ 5 & 6 \end{bmatrix}$$
Calculate minors:
$$\det\begin{bmatrix} 1 & 4 \\ 6 & 0 \end{bmatrix} = (1)(0) - (4)(6) = -24$$
$$\det\begin{bmatrix} 0 & 4 \\ 5 & 0 \end{bmatrix} = (0)(0) - (4)(5) = -20$$
$$\det\begin{bmatrix} 0 & 1 \\ 5 & 6 \end{bmatrix} = (0)(6) - (1)(5) = -5$$
Substitute:
$$= 1 \times (-24) - 2 \times (-20) + 3 \times (-5)$$
$$= -24 + 40 - 15 = 1$$
Since determinant = 1, inverse exists.
Calculate cofactors matrix \(C\):
\[ C = \begin{bmatrix} \det\begin{bmatrix} 1 & 4 \\ 6 & 0 \end{bmatrix} & -\det\begin{bmatrix} 0 & 4 \\ 5 & 0 \end{bmatrix} & \det\begin{bmatrix} 0 & 1 \\ 5 & 6 \end{bmatrix} \\ -\det\begin{bmatrix} 2 & 3 \\ 6 & 0 \end{bmatrix} & \det\begin{bmatrix} 1 & 3 \\ 5 & 0 \end{bmatrix} & -\det\begin{bmatrix} 1 & 2 \\ 5 & 6 \end{bmatrix} \\ \det\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} & -\det\begin{bmatrix} 1 & 3 \\ 0 & 4 \end{bmatrix} & \det\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} \end{bmatrix} \]
Calculate each minor:
Cofactor matrix:
\[ C = \begin{bmatrix} -24 & 20 & -5 \\ 18 & -15 & 4 \\ 5 & -4 & 1 \end{bmatrix} \]
Transpose \(C\) to get adjoint \(adj(B)\):
\[ adj(B) = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{bmatrix} \]
Calculate inverse:
$$B^{-1} = \frac{1}{\det(B)} adj(B) = 1 \times adj(B) = adj(B)$$
Answer:
\[ B^{-1} = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{bmatrix} \]
Example 3: Determine if the matrix below is invertible and find its inverse if possible:
\[ C = \begin{bmatrix} 2 & 4 \\ 1 & 2 \end{bmatrix} \]
Calculate determinant:
$$\det(C) = (2)(2) - (4)(1) = 4 - 4 = 0$$
Since determinant is zero, inverse does not exist.
Answer: The matrix \(C\) is singular and has no inverse.
Solving systems of linear equations is a common task in civil engineering, such as determining forces in a truss or displacements in a frame. Given a matrix equation
$$A X = B,$$
where \(A\) is a known square matrix, \(B\) is a known vector or matrix, and \(X\) is unknown, if \(A^{-1}\) exists, the solution is
$$X = A^{-1} B.$$
Example 1: Solve the system of equations representing forces in a beam:
\[ \begin{cases} 3x + 4y = 10 \\ 2x + 5y = 13 \end{cases} \]
Matrix form:
\[ A = \begin{bmatrix} 3 & 4 \\ 2 & 5 \end{bmatrix}, \quad B = \begin{bmatrix} 10 \\ 13 \end{bmatrix} \]
Calculate determinant:
$$\det(A) = (3)(5) - (4)(2) = 15 - 8 = 7$$
Calculate inverse:
$$A^{-1} = \frac{1}{7} \begin{bmatrix} 5 & -4 \\ -2 & 3 \end{bmatrix}$$
Calculate \(X\):
$$X = A^{-1} B = \frac{1}{7} \begin{bmatrix} 5 & -4 \\ -2 & 3 \end{bmatrix} \begin{bmatrix} 10 \\ 13 \end{bmatrix}$$
Compute multiplication:
$$\begin{bmatrix} 5 \times 10 + (-4) \times 13 \\ -2 \times 10 + 3 \times 13 \end{bmatrix} = \begin{bmatrix} 50 - 52 \\ -20 + 39 \end{bmatrix} = \begin{bmatrix} -2 \\ 19 \end{bmatrix}$$
Multiply by \(1/7\):
$$X = \begin{bmatrix} -\frac{2}{7} \\ \frac{19}{7} \end{bmatrix} = \begin{bmatrix} -0.286 \\ 2.714 \end{bmatrix}$$
Answer: \(x = -0.286\), \(y = 2.714\)
Example 2: Solve for nodal displacements in a truss represented by
\[ A = \begin{bmatrix} 4 & 1 & 0 \\ 1 & 3 & 1 \\ 0 & 1 & 2 \end{bmatrix}, \quad B = \begin{bmatrix} 7 \\ 8 \\ 5 \end{bmatrix} \]
Calculate determinant (from previous methods or calculator):
\[ \det(A) = 4 \times (3 \times 2 - 1 \times 1) - 1 \times (1 \times 2 - 1 \times 0) + 0 = 4 \times (6 - 1) - 1 \times (2 - 0) + 0 = 4 \times 5 - 2 = 20 - 2 = 18 \]
Calculate inverse (using cofactors and adjoint):
Cofactors matrix \(C\):
\[ C = \begin{bmatrix} \det\begin{bmatrix} 3 & 1 \\ 1 & 2 \end{bmatrix} & -\det\begin{bmatrix} 1 & 1 \\ 0 & 2 \end{bmatrix} & \det\begin{bmatrix} 1 & 3 \\ 0 & 1 \end{bmatrix} \\ -\det\begin{bmatrix} 1 & 0 \\ 1 & 2 \end{bmatrix} & \det\begin{bmatrix} 4 & 0 \\ 0 & 2 \end{bmatrix} & -\det\begin{bmatrix} 4 & 1 \\ 0 & 1 \end{bmatrix} \\ \det\begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix} & -\det\begin{bmatrix} 4 & 1 \\ 1 & 3 \end{bmatrix} & \det\begin{bmatrix} 4 & 1 \\ 1 & 3 \end{bmatrix} \end{bmatrix} \]
Calculate each minor:
Cofactor matrix:
\[ C = \begin{bmatrix} 5 & -2 & 1 \\ -2 & 8 & -4 \\ 1 & -11 & 11 \end{bmatrix} \]
Transpose to get adjoint:
\[ adj(A) = \begin{bmatrix} 5 & -2 & 1 \\ -2 & 8 & -11 \\ 1 & -4 & 11 \end{bmatrix} \]
Calculate inverse:
$$A^{-1} = \frac{1}{18} adj(A) = \frac{1}{18} \begin{bmatrix} 5 & -2 & 1 \\ -2 & 8 & -11 \\ 1 & -4 & 11 \end{bmatrix}$$
Calculate \(X = A^{-1} B\):
\[ X = \frac{1}{18} \begin{bmatrix} 5 & -2 & 1 \\ -2 & 8 & -11 \\ 1 & -4 & 11 \end{bmatrix} \begin{bmatrix} 7 \\ 8 \\ 5 \end{bmatrix} \]
Multiply:
Multiply by \(1/18\):
\[ X = \begin{bmatrix} \frac{24}{18} \\ \frac{-5}{18} \\ \frac{30}{18} \end{bmatrix} = \begin{bmatrix} 1.333 \\ -0.278 \\ 1.667 \end{bmatrix} \]
Answer:
\[ x = 1.333, \quad y = -0.278, \quad z = 1.667 \]
Example 3: Solve the system
\[ \begin{cases} x + y + z = 6 \\ 2x + 3y + 5z = 14 \\ 4x + 6y + 8z = 24 \end{cases} \]
Matrix form:
\[ A = \begin{bmatrix} 1 & 1 & 1 \\ 2 & 3 & 5 \\ 4 & 6 & 8 \end{bmatrix}, \quad B = \begin{bmatrix} 6 \\ 14 \\ 24 \end{bmatrix} \]
Calculate determinant:
\[ \det(A) = 1 \times (3 \times 8 - 5 \times 6) - 1 \times (2 \times 8 - 5 \times 4) + 1 \times (2 \times 6 - 3 \times 4) \]
Calculate minors:
Substitute:
\[ = 1 \times (-6) - 1 \times (-4) + 1 \times 0 = -6 + 4 + 0 = -2 \]
Since \(\det(A) \neq 0\), inverse exists.
Calculate cofactors matrix \(C\):
\[ C = \begin{bmatrix} \det\begin{bmatrix} 3 & 5 \\ 6 & 8 \end{bmatrix} & -\det\begin{bmatrix} 2 & 5 \\ 4 & 8 \end{bmatrix} & \det\begin{bmatrix} 2 & 3 \\ 4 & 6 \end{bmatrix} \\ -\det\begin{bmatrix} 1 & 1 \\ 6 & 8 \end{bmatrix} & \det\begin{bmatrix} 1 & 1 \\ 4 & 8 \end{bmatrix} & -\det\begin{bmatrix} 1 & 1 \\ 4 & 6 \end{bmatrix} \\ \det\begin{bmatrix} 1 & 1 \\ 3 & 5 \end{bmatrix} & -\det\begin{bmatrix} 1 & 1 \\ 2 & 5 \end{bmatrix} & \det\begin{bmatrix} 1 & 1 \\ 2 & 3 \end{bmatrix} \end{bmatrix} \]
Calculate each minor:
Cofactor matrix:
\[ C = \begin{bmatrix} -6 & 4 & 0 \\ -2 & 4 & -2 \\ 2 & -3 & 1 \end{bmatrix} \]
Transpose to get adjoint:
\[ adj(A) = \begin{bmatrix} -6 & -2 & 2 \\ 4 & 4 & -3 \\ 0 & -2 & 1 \end{bmatrix} \]
Calculate inverse:
$$A^{-1} = \frac{1}{-2} adj(A) = -\frac{1}{2} \begin{bmatrix} -6 & -2 & 2 \\ 4 & 4 & -3 \\ 0 & -2 & 1 \end{bmatrix} = \begin{bmatrix} 3 & 1 & -1 \\ -2 & -2 & \frac{3}{2} \\ 0 & 1 & -\frac{1}{2} \end{bmatrix}$$
Calculate \(X = A^{-1} B\):
\[ X = \begin{bmatrix} 3 & 1 & -1 \\ -2 & -2 & \frac{3}{2} \\ 0 & 1 & -\frac{1}{2} \end{bmatrix} \begin{bmatrix} 6 \\ 14 \\ 24 \end{bmatrix} \]
Multiply:
Answer:
\[ x = 8, \quad y = -4, \quad z = 2 \]
A square matrix \(A\) is invertible only if its determinant is nonzero. This condition is vital in civil engineering applications where matrix inversion solves equilibrium equations or transforms data.
Key properties of inverses include:
Example 1: Verify invertibility of the matrix
\[ A = \begin{bmatrix} 1 & 2 \\ 3 & 6 \end{bmatrix} \]
Calculate determinant:
$$\det(A) = 1 \times 6 - 2 \times 3 = 6 - 6 = 0$$
Matrix is singular, no inverse.
Example 2: For matrices
\[ A = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, \quad B = \begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} \]
Calculate \((AB)^{-1}\) and verify \((AB)^{-1} = B^{-1} A^{-1}\).
Calculate \(AB\):
\[ AB = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} = \begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} = B \]
Calculate \(B^{-1}\):
\[ \det(B) = 2 \times 4 - 3 \times 1 = 8 - 3 = 5 \]
\[ B^{-1} = \frac{1}{5} \begin{bmatrix} 4 & -3 \\ -1 & 2 \end{bmatrix} \]
Calculate \(A^{-1}\):
\[ A^{-1} = A = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \]
Calculate \(B^{-1} A^{-1} = B^{-1} \times A = B^{-1}\)
Calculate \((AB)^{-1} = B^{-1}\)
Property verified.
Example 3: Show that \((A^T)^{-1} = (A^{-1})^T\) for
\[ A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \]
Calculate \(A^{-1}\):
\[ \det(A) = (1)(4) - (2)(3) = 4 - 6 = -2 \]
\[ A^{-1} = \frac{1}{-2} \begin{bmatrix} 4 & -2 \\ -3 & 1 \end{bmatrix} = \begin{bmatrix} -2 & 1 \\ 1.5 & -0.5 \end{bmatrix} \]
Calculate transpose of \(A\):
\[ A^T = \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix} \]
Calculate \((A^T)^{-1}\):
\[ \det(A^T) = \det(A) = -2 \]
\[ (A^T)^{-1} = \frac{1}{-2} \begin{bmatrix} 4 & -3 \\ -2 & 1 \end{bmatrix} = \begin{bmatrix} -2 & 1.5 \\ 1 & -0.5 \end{bmatrix} \]
Calculate \((A^{-1})^T\):
\[ \begin{bmatrix} -2 & 1 \\ 1.5 & -0.5 \end{bmatrix}^T = \begin{bmatrix} -2 & 1.5 \\ 1 & -0.5 \end{bmatrix} \]
They are equal.
Calculate the determinant of the matrix \(\begin{bmatrix} 6 & 2 \\ 3 & 5 \end{bmatrix}\). (3 marks)
Find the inverse of the matrix \(\begin{bmatrix} 1 & 3 \\ 2 & 7 \end{bmatrix}\). (5 marks)
Given \(A = \begin{bmatrix} 2 & 1 & 0 \\ 0 & 3 & 4 \\ 5 & 6 & 1 \end{bmatrix}\), calculate \(\det(A)\). (6 marks)
Solve the system \(3x + y = 9\), \(x + 2y = 8\) using matrix inverse. (6 marks)
Verify if the matrix \(\begin{bmatrix} 1 & 4 \\ 2 & 8 \end{bmatrix}\) is invertible. (3 marks)
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter explored key matrix operations starting with determinants and inverses, focusing on how to calculate determinants for 2x2 and 3x3 matrices. The process of finding the inverse of a matrix was detailed, highlighting its importance in solving matrix equations. Methods to solve simultaneous linear equations using matrix techniques were covered, particularly Cramer's rule for efficient computation. The concept of eigenvalues and eigenvectors was introduced, explaining their role in characterizing matrix properties. Finally, the chapter examined matrix transformations and their practical applications in two-dimensional and three-dimensional geometric transformations, demonstrating how matrices can be used to manipulate shapes and coordinate systems effectively.
Calculate the determinant of the matrix
\[
A = \begin{bmatrix} 4 & 7 \\ 2 & 6 \end{bmatrix}
\]
(2 marks)
Find the inverse of the matrix
\[
B = \begin{bmatrix} 3 & 5 \\ 1 & 2 \end{bmatrix}
\]
if it exists.
(3 marks)
Given the matrix representing forces in a retaining wall design at a Nairobi construction site:$$A = \begin{bmatrix} 4 & 2 \\ 3 & 5 \end{bmatrix}$$ Calculate the determinant of matrix \(A\). (4 marks)
Find the determinant of the following 3x3 matrix representing moment coefficients in a bridge structure:$$B = \begin{bmatrix} 1 & 0 & 2 \\ -1 & 3 & 1 \\ 2 & -2 & 1 \end{bmatrix}$$ (4 marks)
At the start of this chapter we promised you would be able to:
Tick each one you can genuinely do.
So, are you there yet?
You're competent when you can confidently do 50% or more of what this chapter promised.
Sign in to record how you're doing.