Applied Mathematics

Chapter 4
Linear Algebra and Matrix Methods

Bachelors Program in Machine Technology
Applied Mathematics   •   Bachelor

Linear Algebra and Matrix Methods

Introduction and Context

Linear algebra provides a systematic language for describing collections of quantities, geometric relationships, and interconnected engineering systems. In machine technology, the unknowns may be joint displacements, reaction forces, motor currents, angular velocities, or state variables. The governing equations are often linear, or can be approximated as linear near an operating point. Matrix methods organize these equations so that they can be solved efficiently, interpreted structurally, and implemented in engineering software.

A linear system is commonly written as

A x = b

where A is the coefficient matrix, x is the vector of unknowns, and b is the forcing or input vector. If a machine structure has three unknown reaction forces, for example, each row of A x = b represents an equilibrium or compatibility equation.

This chapter develops matrix representation, Gaussian elimination, determinants, rank, vector spaces, eigenvalues, eigenvectors, and applications to mechanisms, structures, vibration, and state-space models.

Learning Objectives

By the end of this chapter, the reader should be able to:

  1. Represent engineering equations in matrix and augmented-matrix form.
  2. Solve linear systems using Gaussian elimination and interpret their solutions.
  3. Use determinants and rank to assess existence and uniqueness of solutions.
  4. Explain vector spaces, linear independence, bases, and dimension.
  5. Calculate and interpret eigenvalues and eigenvectors.
  6. Apply matrix methods to mechanisms, structural systems, vibration, and state-space models.
  7. Identify numerical, modelling, and conditioning limitations in practical computations.

1. Vectors and Matrices

A vector is an ordered list of quantities. A column vector with three components is written as

x = [x₁, x₂, x₃]ᵀ

The superscript T denotes transpose. In mechanics, the entries may represent forces or displacements. A matrix is a rectangular array of numbers or functions:

A = [a₁₁ a₁₂
a₂₁ a₂₂]

The element aᵢⱼ lies in row i and column j. A matrix with m rows and n columns has size m × n.

Matrix addition is defined only for matrices of equal size and is performed element by element. Matrix multiplication is defined when the number of columns in the first matrix equals the number of rows in the second. If A is m × n and B is n × p, then AB is m × p with elements

(AB)ᵢⱼ = ∑ₖ₌₁ⁿ aᵢₖ bₖⱼ

Matrix multiplication is generally not commutative: AB ≠ BA. This matters in transformations, rotations, and sequential machine operations.

The identity matrix I has ones on its main diagonal and zeros elsewhere. For a square matrix, AI = IA = A. If a matrix has an inverse, denoted A⁻¹, then

A⁻¹A = AA⁻¹ = I

The inverse exists only for a nonsingular square matrix.

2. Formulating Linear Systems

A system of three equations,

2x + y − z = 3
x + 3y + 2z = 13
3x − y + z = 2

can be represented as

[2 1 −1] [x] [3]
[1 3 2] [y] = [13]
[3 −1 1] [z] [2]

or, more compactly, A x = b. The augmented matrix combines coefficients and right-hand sides:

[A | b] = [2 1 −1 | 3
1 3 2 | 13
3 −1 1 | 2]

The formulation stage is often more important than the arithmetic. All unknowns must be defined consistently, equations must use a common sign convention, and quantities must have compatible units. A force equation should not combine newtons with kilonewtons without conversion.

Homogeneous and nonhomogeneous systems

A homogeneous system has zero right-hand side:

A x = 0

It always has the trivial solution x = 0. Nonzero solutions exist when the columns of A are linearly dependent. A nonhomogeneous system A x = b may have no solution, one solution, or infinitely many solutions.

3. Gaussian Elimination

Gaussian elimination transforms an augmented matrix into an equivalent row-echelon form. The permitted elementary row operations are:

  1. Interchange two rows.
  2. Multiply a row by a nonzero constant.
  3. Add a multiple of one row to another row.

These operations preserve the solution set. In reduced row-echelon form, each pivot is 1 and is the only nonzero entry in its column. Back-substitution can then determine unknowns.

Worked Example 1: Solving a three-variable system

Consider

2x + y − z = 3
x + 3y + 2z = 13
3x − y + z = 2

Exchange the first two rows to obtain a convenient first pivot:

[1 3 2 | 13
2 1 −1 | 3
3 −1 1 | 2]

Eliminate the first column:

R₂ → R₂ − 2R₁
R₃ → R₃ − 3R₁

giving

[1 3 2 | 13
0 −5 −5 | −23
0 −10 −5 | −37]

Next, eliminate the second-column entry in row 3:

R₃ → R₃ − 2R₂

so that

[1 3 2 | 13
0 −5 −5 | −23
0 0 5 | 9]

Thus, 5z = 9, so z = 1.8. From the second row,

−5y − 5(1.8) = −23, giving y = 2.8. From the first row,

x + 3(2.8) + 2(1.8) = 13, giving x = 1.6.

The solution is therefore

x = 1.6, y = 2.8, z = 1.8

Substitution into all original equations is the recommended verification step.

Pivoting and numerical stability

In computer calculations, division by a very small pivot can amplify rounding errors. Partial pivoting exchanges the current row with a lower row having a larger absolute pivot in the current column. It usually improves numerical reliability without changing the exact solution. For large systems, direct elimination may be replaced by LU factorization, where

A = L U

with L lower triangular and U upper triangular. The system is then solved by forward substitution followed by back-substitution.

4. Determinants and Rank

The determinant is a scalar associated with a square matrix. For a 2 × 2 matrix,

det(A) = |a b|
|c d| = ad − bc

The determinant is dimensionally meaningful only when the matrix entries and coordinate scaling are interpreted consistently. In applications, it may carry units; it is not automatically dimensionless.

For an n × n matrix, the determinant can be defined recursively by cofactors, although elimination is generally more efficient computationally. Important properties include:

  • det(AB) = det(A)det(B).
  • det(Aᵀ) = det(A).
  • Interchanging two rows changes the sign.
  • Multiplying one row by k multiplies the determinant by k.
  • A triangular matrix has determinant equal to the product of its diagonal entries.

A square matrix is nonsingular precisely when

det(A) ≠ 0

In that case, A x = b has one solution for every b, and x = A⁻¹b. If det(A) = 0, the matrix is singular and the system may have no solution or infinitely many solutions.

Cramer's rule

For a small n × n system, Cramer's rule gives

xᵢ = det(Aᵢ) / det(A)

where Aᵢ is obtained by replacing column i of A with b. The rule is theoretically useful but computationally inefficient for large systems and should not normally replace elimination.

Rank and consistency

The rank of a matrix is the number of linearly independent rows or columns, equivalently the number of pivots in row-echelon form. For A x = b, the system is consistent if and only if

rank(A) = rank([A | b])

If this common rank equals the number of unknowns, the solution is unique. If it is smaller than the number of unknowns, infinitely many solutions exist. If the augmented rank is larger than the coefficient rank, no solution exists.

5. Vector Spaces and Linear Independence

A vector space is a set closed under vector addition and scalar multiplication and satisfying the standard vector-space axioms. Examples include ℝⁿ, polynomial spaces, and spaces of matrices.

Vectors v₁, v₂, …, vₖ are linearly independent if

c₁v₁ + c₂v₂ + … + cₖvₖ = 0

implies that every scalar cᵢ = 0. If a nonzero set of coefficients satisfies this equation, the vectors are dependent.

A basis is a linearly independent set that spans the space. The number of vectors in a basis is the dimension. The column space of A consists of all linear combinations of its columns; the null space consists of all vectors satisfying A x = 0. The rank–nullity theorem states

rank(A) + nullity(A) = n

for a matrix with n columns. This theorem explains why dependent equations create free variables and multiple solutions.

A coordinate transformation expresses the same physical vector using a different basis. In robotics and machine design, changing between global and local coordinate frames is a matrix operation. Transformation matrices must be applied in the correct order because rotations generally do not commute.

6. Eigenvalues and Eigenvectors

An eigenvector is a nonzero vector whose direction is unchanged by a linear transformation, although its magnitude may be scaled. For square matrix A, an eigenvalue λ and eigenvector v satisfy

A v = λ v, v ≠ 0

Rearranging gives

(A − λI)v = 0

A nonzero solution exists only when

det(A − λI) = 0

This equation is the characteristic equation. Its roots are the eigenvalues. After finding each λ, substitute it into (A − λI)v = 0 to find the associated eigenvectors.

Worked Example 2: A two-degree-of-freedom system

Let

A = [4 1
2 3]

The characteristic equation is

det(A − λI) = |4−λ 1 |
| 2 3−λ| = (4−λ)(3−λ) − 2

Therefore,

λ² − 7λ + 10 = 0

and hence λ₁ = 5 and λ₂ = 2.

For λ₁ = 5,

(A − 5I)v = [−1 1; 2 −2]v = 0

so an eigenvector is v₁ = [1, 1]ᵀ. For λ₂ = 2,

(A − 2I)v = [2 1; 2 1]v = 0

so one eigenvector is v₂ = [1, −2]ᵀ. Eigenvectors may be multiplied by any nonzero scalar; their direction, not their normalization, is important.

If a matrix has enough independent eigenvectors, it can be diagonalized:

A = P D P⁻¹

where the columns of P are eigenvectors and D contains eigenvalues on its diagonal. Diagonalization simplifies repeated transformations and analytical solutions of certain differential equations. It is not always possible, especially when repeated eigenvalues do not have enough independent eigenvectors.

7. Engineering Applications

7.1 Mechanisms and kinematics

For a mechanism, a velocity constraint may be written as

J(q) q̇ = v

where q is the vector of generalized coordinates, q̇ their rates, J(q) the Jacobian matrix, and v a prescribed output velocity. The Jacobian depends on configuration. If it loses rank, the mechanism reaches a singular configuration: certain motions may become impossible or require very large actuator forces.

For a planar revolute joint with end-point coordinates

x = L cos θ, y = L sin θ

where L is link length and θ is joint angle, differentiation gives

[ẋ] = [−L sin θ] θ̇
[ẏ] [ L cos θ]

The matrix multiplying θ̇ is a Jacobian. Its entries have units of length, so multiplying by angular velocity gives linear velocity.

7.2 Structural equilibrium

For a discretized truss or frame, static equilibrium commonly takes the form

K u = f

where K is the stiffness matrix, u is the displacement vector, and f is the applied-load vector. If stiffness is measured in N/m and displacement in m, the product has units of N. Boundary conditions must be imposed before solving. An unconstrained rigid-body mode can make K singular because the structure can move without elastic deformation.

The stiffness matrix is often assembled element by element. Each element contributes coefficients to the global degrees of freedom associated with its nodes. This assembly process is a central example of matrix methods supporting computer-aided engineering.

7.3 Free vibration and modal analysis

For an undamped multi-degree-of-freedom system,

M q̈ + K q = 0

where M is the mass matrix, K is the stiffness matrix, and q is the displacement vector. Assume harmonic motion

q(t) = φ eiωt

where φ is a mode shape, ω is natural angular frequency in rad/s, and i² = −1. Since q̈ = −ω²φeiωt, substitution gives

(K − ω²M)φ = 0

A nonzero mode shape exists when

det(K − ω²M) = 0

This is a generalized eigenvalue problem. The eigenvalues are ω², and the natural frequency in hertz is

f = ω / (2π)

provided ω is expressed in rad/s. In a damped system, eigenvalues may be complex, indicating both oscillation and decay or growth.

7.4 State-space models

A first-order state-space model has the form

ẋ = A x + B u
y = C x + D u

where x is the state vector, u the input vector, y the output vector, and A, B, C, D system matrices. The dimensions must be compatible. For example, if there are n states, m inputs, and p outputs, then A is n × n, B is n × m, C is p × n, and D is p × m.

The eigenvalues of A determine continuous-time internal modes. Eigenvalues with negative real parts correspond to asymptotic decay, while any eigenvalue with positive real part indicates instability in the linear model. A zero real part requires further analysis and may indicate marginal stability or an inadequately modelled mode.

8. Illustrative Case: Vibration of a Two-Mass Machine Assembly

Background

Consider two machine components connected in series by elastic couplings. Each component has mass m and each coupling has stiffness k. The coordinates x₁ and x₂ describe small horizontal displacements from equilibrium. Damping is initially neglected to expose the modal structure.

Problem

Determine the natural frequencies and mode shapes of the idealized system, assuming both masses are attached to fixed ground through springs and are also coupled to each other.

Analysis and approach

The equations are

m ẍ₁ + 2k x₁ − kx₂ = 0
m ẍ₂ − kx₁ + 2k x₂ = 0

Thus,

M = [m 0
0 m], K = [2k −k
−k 2k]

The modal condition is

det(K − ω²M) = 0

Let α = k/m. Then

K − ω²M = m[2α − ω² −α
−α 2α − ω²]

The determinant condition becomes

(2α − ω²)² − α² = 0

so

ω₁² = α = k/m,
ω₂² = 3α = 3k/m

Therefore,

ω₁ = √(k/m), ω₂ = √(3k/m)

The first mode has equal motion, φ₁ ∝ [1, 1]ᵀ, because both masses move together. The second has opposite motion, φ₂ ∝ [1, −1]ᵀ, which stretches the connecting spring more strongly.

Outcome and interpretation

If m = 10 kg and k = 1000 N/m, then

ω₁ = √(1000/10) = √100 = 10 rad/s

and

ω₂ = √300 ≈ 17.32 rad/s

The corresponding frequencies are f₁ ≈ 1.59 Hz and f₂ ≈ 2.76 Hz. These values help an engineer avoid operating speeds near resonance. In a real assembly, damping, nonlinear couplings, joint friction, distributed mass, and support flexibility would alter the predicted response.

Learning points

The case demonstrates how mass and stiffness matrices convert a physical model into a generalized eigenvalue problem. Eigenvectors provide relative motion patterns, while eigenvalues provide squared natural frequencies. The model is useful only when its assumptions—small displacement, linear stiffness, idealized supports, and negligible damping—are reasonable.

9. Limitations, Best Practices, and Professional Practice

Matrix results are only as reliable as the model and data. Common sources of error include incorrect degrees of freedom, inconsistent units, omitted boundary conditions, sign errors, and inappropriate linearization. A singular matrix may indicate a true physical mechanism, an unconstrained rigid-body motion, redundant equations, or a modelling mistake.

Conditioning is also important. A matrix may be nonsingular but ill-conditioned, meaning that small changes in input data produce large changes in the computed solution. The condition number, conceptually the ratio of maximum to minimum amplification, is a warning indicator; exact definitions depend on the selected matrix norm. Scaling variables and using pivoted numerical methods can improve performance.

Best practice includes:

  • Define coordinates, signs, units, and assumptions before assembling matrices.
  • Check dimensions and sparsity patterns.
  • Apply boundary conditions explicitly and document them.
  • Prefer factorization or robust numerical solvers to computing an inverse directly.
  • Verify solutions by substitution and, where possible, an independent physical check.
  • Inspect residuals, such as r = b − A x, rather than relying only on solver status.
  • Test sensitivity to uncertain parameters.
  • Preserve traceability when matrices are generated by software.

Engineering software can calculate large matrix systems rapidly, but software output does not establish physical validity. Engineers remain responsible for model selection, interpretation, safety margins, and communicating uncertainty. In safety-critical applications, independent verification, version control, documented assumptions, and applicable engineering standards are essential.

Contemporary developments include sparse direct solvers, iterative methods for very large systems, reduced-order models, digital twins, and data-assisted model updating. Machine-learning methods may estimate parameters or identify modes from measured data, but they should be checked against conservation laws, dimensional consistency, stability requirements, and validation experiments. An apparently accurate prediction is not sufficient evidence that a learned model is physically trustworthy.

Chapter Summary

Linear algebra expresses interconnected engineering relationships in a compact and computable form. Matrix equations such as A x = b represent equilibrium, kinematic, electrical, and state equations. Gaussian elimination solves systems while preserving their solution sets through elementary row operations. Determinants identify singularity for square matrices, and rank classifies consistency, uniqueness, and free variables.

Vector spaces provide the concepts of span, linear independence, basis, dimension, column space, and null space. Eigenvalues and eigenvectors identify characteristic directions and scaling factors. In machine technology, Jacobians describe mechanism velocities and singularities, stiffness matrices describe structural equilibrium, generalized eigenproblems determine vibration modes, and state-space matrices describe dynamic systems and stability.

Reliable application requires correct modelling, compatible units, appropriate boundary conditions, numerical awareness, verification, and professional judgement. Matrix computation is powerful, but it does not replace physical reasoning.

Key Terms

Matrix: Rectangular array of numbers or functions.

Vector: Ordered list of components representing quantities or coordinates.

Coefficient matrix: Matrix containing coefficients of the unknown variables.

Augmented matrix: Matrix formed by adjoining the right-hand-side vector to the coefficient matrix.

Gaussian elimination: Row-operation method for reducing and solving linear systems.

Pivot: Leading nonzero entry used to eliminate entries in a column.

Determinant: Scalar measure associated with a square matrix that indicates singularity and scaling properties.

Nonsingular matrix: Square matrix with nonzero determinant and an inverse.

Rank: Number of linearly independent rows or columns, equal to the number of pivots.

Null space: Set of vectors satisfying A x = 0.

Linear independence: Property in which only the zero combination of vectors equals zero.

Basis: Linearly independent set that spans a vector space.

Dimension: Number of vectors in a basis.

Eigenvalue: Scalar λ satisfying A v = λv for a nonzero vector.

Eigenvector: Nonzero vector whose direction is preserved by a matrix transformation.

Jacobian: Matrix of partial derivatives relating small changes in variables.

Stiffness matrix: Matrix relating structural displacements to applied forces.

Mode shape: Relative displacement pattern associated with a natural frequency.

State-space model: First-order representation of dynamic states, inputs, and outputs.

Conditioning: Sensitivity of a numerical problem to changes in data or round-off.

Review Questions

5 Short Answer Questions

  1. What are the three elementary row operations used in Gaussian elimination?
  2. What condition on det(A) guarantees that a square matrix is invertible?
  3. Define the rank of a matrix.
  4. What is the physical meaning of an eigenvector in a vibration problem?
  5. State the dimensions of A, B, C, D for a state model with n states, m inputs, and p outputs.

5 Long Answer Questions

  1. Explain how an engineering equilibrium problem is formulated as A x = b, including the importance of units, signs, and boundary conditions.
  2. Describe Gaussian elimination and explain why pivoting improves numerical reliability.
  3. Explain the relationship among determinant, rank, consistency, and uniqueness of a linear system.
  4. Derive the generalized eigenvalue equation for an undamped multi-degree-of-freedom vibration system.
  5. Discuss how matrix methods are used in mechanism kinematics, structural analysis, and state-space modelling.

3 Analytical / Application Questions

  1. A structural model has a stiffness matrix with a zero determinant before supports are applied. Explain two possible physical or modelling causes and describe how you would investigate them.
  2. For a two-degree-of-freedom machine model, explain how the eigenvectors can reveal whether components move in phase or out of phase, and why this matters for resonance and fatigue.
  3. A computed solution satisfies the solver’s convergence message but has a large residual r = b − A x. Analyse possible causes and recommend corrective actions.

Multiple Choice Questions with Answers

Question 1

Which matrix equation represents a linear system with coefficient matrix A, unknown vector x, and right-hand-side vector b?

A. A + x = b

B. A x = b

C. A ÷ x = b

D. x A = b

Correct Answer: B. A x = b

Question 2

Which operation is not an elementary row operation permitted in Gaussian elimination?

A. Interchanging two rows

B. Multiplying a row by a nonzero constant

C. Adding a multiple of one row to another

D. Multiplying one row by zero

Correct Answer: D. Multiplying one row by zero

Question 3

For a square matrix A, which condition guarantees a unique solution to A x = b for every b?

A. det(A) = 0

B. rank(A) = 0

C. det(A) ≠ 0

D. A has more columns than rows

Correct Answer: C. det(A) ≠ 0

Question 4

What does the rank of a matrix equal in row-echelon form?

A. The number of pivots

B. The number of zero entries

C. The number of columns only

D. The determinant of the matrix

Correct Answer: A. The number of pivots

Question 5

For A = [4 1; 2 3]], what are the eigenvalues?

A. 1 and 3

B. 2 and 5

C. 4 and 3

D. −2 and −5

Correct Answer: B. 2 and 5

Question 6

In the structural equation K u = f, what does K normally represent?

A. The displacement vector

B. The applied-load vector

C. The stiffness matrix

D. The damping coefficient only

Correct Answer: C. The stiffness matrix

Question 7

For an undamped vibration system, which equation determines the natural frequencies?

A. det(K + ω²M) = 0

B. det(K − ω²M) = 0

C. det(M − K) = 1

D. K u = f

Correct Answer: B. det(K − ω²M) = 0

Question 8

If a state-space matrix A has an eigenvalue with positive real part, what does the linear continuous-time model indicate?

A. Asymptotic stability

B. Instability

C. Zero displacement only

D. Guaranteed resonance-free operation

Correct Answer: B. Instability

Question 9

For the two-mass illustrative case with m = 10 kg and k = 1000 N/m, what is the first natural angular frequency?

A. 1 rad/s

B. 10 rad/s

C. 100 rad/s

D. 17.32 rad/s

Correct Answer: B. 10 rad/s

Question 10

What is a principal reason for using partial pivoting during numerical elimination?

A. To increase the number of unknowns

B. To remove all physical constraints

C. To reduce amplification of round-off errors

D. To make every determinant equal to zero

Correct Answer: C. To reduce amplification of round-off errors

Applied Mathematics
Chapter 4 of 15