Subject: Civil Engineering Chapter: Engineering Mathematics Topic: 1.6 Matrices and Determinants
Matrices are rectangular arrays of numbers that are manipulated according to definite rules, and determinants are scalar values associated with square matrices. In civil engineering, matrices are the natural way to represent and solve systems of simultaneous linear equations that arise in the analysis of trusses, frames and indeterminate structures, in the stiffness method of structural analysis, in the analysis of surveying networks, and in the solution of network flow problems. Competitive examinations in civil engineering test matrices and determinants both as direct questions on definitions, properties and operations, and as applied questions on the solution of linear equations by matrix methods.
The study of matrices begins with the elementary definitions: a matrix is an ordered rectangular arrangement of numbers called elements, arranged in rows and columns. A matrix with m rows and n columns is said to be of order m by n. A square matrix has the same number of rows and columns, a row matrix has a single row, a column matrix has a single column, and two matrices are equal only when they have the same order and identical corresponding elements. The diagonal of a square matrix runs from the top left to the bottom right, and special square matrices such as the identity matrix, the zero matrix, diagonal matrices and triangular matrices have particular structures that simplify computation.
A determinant is a scalar computed from a square matrix by a systematic procedure, and it tells us whether a matrix can be inverted and whether a system of linear equations has a unique solution. The determinant of a 2 by 2 matrix with elements a, b, c and d equals a d minus b c. The determinant of a 3 by 3 matrix is evaluated by expansion along any row or column, using a scheme of alternating signs, or by the rule of Sarrus. The properties of determinants allow them to be simplified before evaluation, which saves considerable arithmetic. In this chapter we will study these operations, the inverse of a matrix, the rank of a matrix, and the three standard methods for solving simultaneous linear equations, namely matrix inversion, Cramer's rule and Gaussian elimination.
The basic operations on matrices are addition, scalar multiplication and multiplication. Two matrices of the same order can be added by adding corresponding elements, and the difference is defined similarly. A matrix can be multiplied by a scalar by multiplying every element by that scalar. Matrix multiplication is defined between two matrices only when the number of columns of the first matrix equals the number of rows of the second; the product matrix then has the number of rows of the first and the number of columns of the second. The element in the ith row and jth column of the product is the sum of the products of corresponding elements of the ith row of the first matrix and the jth column of the second.
Matrix multiplication is not commutative, so A B is generally not equal to B A, a fact that must always be remembered. It is, however, associative and distributive over addition. Multiplication by the identity matrix leaves a matrix unchanged, and a matrix multiplied by its inverse, when it exists, gives the identity matrix. The transpose of a matrix, obtained by interchanging rows and columns, is written with a superscript T, and a symmetric matrix equals its transpose. The trace of a square matrix is the sum of its diagonal elements, and it appears in the theory of eigenvalues and in the formulation of structural stiffness matrices.
The determinant of a 3 by 3 matrix can be evaluated by Sarrus's rule, in which the first two columns are repeated to the right of the matrix and the products along the three diagonals in one direction are summed and subtracted from the products along the three diagonals in the other direction. Alternatively, expansion along a row or column uses minors and cofactors with alternating signs. The properties of determinants state that a determinant is zero if two rows or columns are identical or proportional, a determinant changes sign when two rows or columns are interchanged, and a determinant is unchanged when a multiple of one row or column is added to another. These properties are used to simplify determinants by creating zeros.
Example 1: If A = [1 2; 3 4] and B = [5 6; 7 8], find A + B. Solution: Adding corresponding elements, A + B = [1+5 2+6; 3+7 4+8] = [6 8; 10 12].
Example 2: Evaluate the determinant of the matrix [2 3; 4 5]. Solution: The determinant equals 2 x 5 - 3 x 4 = 10 - 12 = -2.
Example 3: If A = [1 0; 0 1] and B = [2 1; 1 3], find A B. Solution: A is the identity matrix, so A B = B = [2 1; 1 3].
The inverse of a square matrix A, written A to the power -1, is the matrix that satisfies the condition A times A to the power -1 equals the identity matrix and A to the power -1 times A equals the identity matrix. A square matrix possesses an inverse if and only if its determinant is non-zero; such a matrix is called non-singular, while a matrix with zero determinant is singular and has no inverse. The inverse of a 2 by 2 matrix [a b; c d] is 1 divided by (a d - b c) times the matrix [d -b; -c a], in which the diagonal elements are interchanged and the off-diagonal elements change sign.
For a 3 by 3 matrix, the inverse is computed through the adjoint matrix, which is the transpose of the matrix of cofactors. The inverse equals the adjoint divided by the determinant. In practice, the augmented matrix method, also called the Gauss-Jordan method, is faster: the identity matrix is placed beside A, row operations are performed until A becomes the identity, and the matrix on the right then becomes the inverse. The inverse is the fundamental tool of the matrix method of structural analysis, where the displacement vector is obtained by multiplying the inverse of the stiffness matrix by the load vector.
The rank of a matrix is the order of the largest square submatrix whose determinant is non-zero, and it measures the number of independent rows or columns of the matrix. The rank is found by reducing the matrix to row-echelon form using elementary row operations and counting the number of non-zero rows. The rank concept is used to test the consistency of systems of linear equations: a system has a unique solution when the rank of the coefficient matrix equals the rank of the augmented matrix and equals the number of unknowns; it has infinitely many solutions when the two ranks are equal but smaller than the number of unknowns; and it has no solution when the ranks are unequal.
Example 4: Find the inverse of the matrix A = [2 1; 5 3]. Solution: Determinant = 2 x 3 - 1 x 5 = 6 - 5 = 1, which is non-zero. The inverse is 1/1 times [3 -1; -5 2] = [3 -1; -5 2].
Example 5: Find the rank of the matrix [1 2; 2 4]. Solution: The determinant is 1 x 4 - 2 x 2 = 0, so the rank is not 2. Since there is at least one non-zero 1 by 1 submatrix, the rank is 1.
A system of linear equations can be written in matrix form as A X = B, where A is the coefficient matrix, X is the column vector of unknowns, and B is the column vector of constants. When A is non-singular, the unique solution is X = A to the power -1 times B. This matrix method is compact and is the basis of the stiffness method of structural analysis, in which the stiffness matrix K relates the displacement vector D to the force vector P through the equation K D = P, so that D equals K inverse times P. The method is equally applicable to trusses, continuous beams, frames and finite element analysis.
Cramer's rule provides an alternative solution of a system when the determinant of the coefficient matrix is non-zero. For each unknown, the column of constants replaces the corresponding column of the coefficient matrix, the determinant of the resulting matrix is computed, and the unknown equals that determinant divided by the determinant of the original coefficient matrix. Cramer's rule is elegant for two or three unknowns but becomes inefficient for large systems, where elimination methods are preferred. Gaussian elimination reduces the augmented matrix to row-echelon form by elementary row operations and then solves by back-substitution, and it is the method actually programmed into computers and calculators.
For a system with the same number of equations and unknowns, the system is homogeneous if the constant vector is zero, and such a system always has at least the trivial solution of all unknowns equal to zero. A homogeneous system has non-trivial solutions if and only if the determinant of the coefficient matrix is zero. This condition is used in eigenvalue problems, where the equation A X = lambda X is rearranged to (A - lambda I) X = 0, which has non-trivial solutions exactly when the determinant of (A - lambda I) is zero. The resulting equation in lambda is called the characteristic equation, and its roots are the eigenvalues, which in civil engineering give the natural frequencies of vibration of structures and the critical loads of columns.
Example 6: Solve the system 2x + y = 5 and 5x + 3y = 13 by matrix inversion. Solution: The system is A X = B with A = [2 1; 5 3], X = [x; y], B = [5; 13]. From Example 4, A inverse = [3 -1; -5 2]. Hence X = A inverse B = [3 x 5 - 13; -5 x 5 + 2 x 13] = [2; 1]. So x = 2 and y = 1.
Example 7: Find the eigenvalues of the matrix [2 0; 0 3]. Solution: The characteristic equation is the determinant of (A - lambda I) = |2 - lambda 0; 0 3 - lambda| = 0, giving (2 - lambda)(3 - lambda) = 0. Hence the eigenvalues are lambda = 2 and lambda = 3.
| Matrix Type | Definition | Example |
|---|---|---|
| Row matrix | single row | [1 2 3] |
| Column matrix | single column | [1; 2; 3] |
| Square matrix | equal rows and columns | [1 2; 3 4] |
| Diagonal matrix | non-zero only on main diagonal | [2 0; 0 3] |
| Identity matrix | diagonal matrix with all ones | [1 0; 0 1] |
| Symmetric matrix | A equals A transpose | [1 2; 2 3] |
| Singular matrix | determinant equals zero | [1 2; 2 4] |
| Method | Condition | Result |
|---|---|---|
| Matrix inversion X = A-1 B | det A non-zero | unique solution |
| Cramer's rule | det A non-zero | unique solution |
| Gaussian elimination | rank conditions | unique or infinite or none |
| Consistency test | rank of A vs augmented | classify the system |
| Homogeneous system | det A = 0 | non-trivial solutions |
| Eigenvalue problem | det(A - lambda I) = 0 | natural frequencies |
flowchart TD
A[Matrices and Determinants] --> B[Matrix operations]
A --> C[Determinants]
A --> D[Inverse and rank]
A --> E[Linear equations]
A --> F[Eigenvalues]
B --> B1[Addition and scalar multiplication]
B --> B2[Multiplication]
B --> B3[Transpose and trace]
C --> C1[2x2 and 3x3 evaluation]
C --> C2[Properties of determinants]
D --> D1[Inverse by adjoint and Gauss-Jordan]
D --> D2[Rank and consistency]
E --> E1[Matrix inversion method]
E --> E2[Cramer's rule]
E --> E3[Gaussian elimination]
F --> F1[Characteristic equation]
F --> F2[Structural vibration frequencies]
The following diagrams illustrate matrix multiplication with a visual arrangement and the stiffness method of structural analysis for a truss.
Matrices and determinants provide the civil engineer with a compact and powerful algebra for dealing with systems of equations, and they are the mathematical engine of modern structural analysis. In this chapter we have studied the operations on matrices, the evaluation of determinants and their simplifying properties, the computation of inverses and ranks, the matrix, Cramer and Gaussian methods for solving linear equations, and the eigenvalue problem that gives the natural frequencies of structures. Worked numerical examples have connected every concept to the examination style, and the quick revision tables and mind map consolidate the results for rapid revision. The stiffness method of structural analysis, the flexibility method, the analysis of indeterminate beams and frames, and the finite element method are all built directly on the matrix concepts of this chapter. A candidate who masters matrices and determinants will find that this chapter opens the door to the applied analysis subjects of the civil engineering curriculum, and it will repeatedly reward the investment made in memorising the operations, the inverse formulas and the consistency conditions.