By the end of this chapter, you will be able to:
These skills will help you solve real-world engineering problems with confidence and precision, making your work reliable and efficient.
Matrices are fundamental tools in biomedical engineering for organizing and manipulating data such as physiological measurements, imaging information, and system parameters. Applying matrices allows engineers to model complex biological systems, analyze signals, and design control systems for medical devices. This chapter introduces matrices, their types, notation, and basic operations, all contextualized for biomedical engineering applications in Kenya.
A matrix is a rectangular array of numbers arranged in rows and columns. Matrices store and process many related values at once: the readings of several sensor channels over time, the coefficients of a set of equations, or the brightness of the pixels in an image. A technician who understands the types of matrix and the basic operations can read the data tables and system models used in monitoring and imaging equipment.
A matrix is a rectangular arrangement of numbers, called elements, in rows and columns, enclosed in brackets. A matrix with m rows and n columns has size m × n, read "m by n", with the number of rows always stated first. The element in row i and column j is written aᵢⱼ.
The general m × n matrix A is:
A = [ a11 a12 ... a1n ]
[ a21 a22 ... a2n ]
[ ... ... ... ... ]
[ am1 am2 ... amn ]
Example 1: An ECG monitor records two channels at three instants. Channel 1 reads 0.5 mV, 0.7 mV and 0.6 mV, and channel 2 reads 0.3 mV, 0.4 mV and 0.5 mV. Write the readings as a matrix E, with one row for each channel.
E = [ 0.5 0.7 0.6 ]
[ 0.3 0.4 0.5 ]
E has 2 rows and 3 columns, so its size is 2 × 3.
Example 2: Oxygen saturation (%) is measured twice for each of three patient simulators: simulator 1 reads 95 and 96, simulator 2 reads 90 and 92, and simulator 3 reads 88 and 89. Write a 3 × 2 matrix O with one row for each simulator.
[ 95 96 ]
O = [ 90 92 ]
[ 88 89 ]
Example 3: State the size of the matrix M.
M = [ 1 2 3 4 ]
[ 5 6 7 8 ]
M has 2 rows and 4 columns.
Answer: The size of M is 2 × 4.
Matrices are named by their shape and by the pattern of their elements. Recognising the type tells a technician which operations are allowed.
Example 1: Identify the type and size of A.
A = [ 3 5 7 ]
Answer: A is a row matrix of size 1 × 3.
Example 2: Identify the type and size of B.
[ 2 ]
B = [ 4 ]
[ 6 ]
Answer: B is a column matrix of size 3 × 1.
Example 3: Identify the type of C.
[ 1 0 0 ]
C = [ 0 1 0 ]
[ 0 0 1 ]
Answer: C is square, with ones on the main diagonal and zeros elsewhere, so it is the 3 × 3 identity matrix.
Example 4: Is D square or rectangular?
[ 7 8 ]
D = [ 9 10 ]
[ 11 12 ]
Answer: D has 3 rows and 2 columns, so it is a rectangular matrix of size 3 × 2.
Example 5: Identify the type of Z.
Z = [ 0 0 ]
[ 0 0 ]
Answer: Z is the 2 × 2 zero matrix.
A capital letter names a matrix and the matching small letter with two subscripts names an element. In aᵢⱼ the first subscript i is the row number and the second subscript j is the column number, so a₂₃ is the element in row 2, column 3. A matrix can be written in short form as A = [aᵢⱼ] of size m × n, where i takes the values 1, 2, ..., m and j takes the values 1, 2, ..., n. This notation lets a rule for the elements be written as a formula.
Example 1: Write down the element a₂₃ of A.
A = [ 1 2 3 ]
[ 4 5 6 ]
Row 2 is 4, 5, 6 and column 3 of that row is 6.
Answer: a₂₃ = 6
Example 2: Write down the element b₃₁ of B.
[ 7 8 ]
B = [ 9 10 ]
[ 11 12 ]
Row 3 is 11, 12 and column 1 of that row is 11.
Answer: b₃₁ = 11
Example 3: Find the element c₂₂ of C.
[ 2 4 6 ]
C = [ 8 10 12 ]
[ 14 16 18 ]
Answer: c₂₂ = 10
Example 4: A 3 × 3 matrix D has elements given by dᵢⱼ = i + j. Find d₂₃ and write out the matrix.
d₂₃ = 2 + 3 = 5
[ 2 3 4 ]
D = [ 3 4 5 ]
[ 4 5 6 ]
Answer: d₂₃ = 5
Example 5: A 2 × 4 matrix E has elements given by eᵢⱼ = 3i − j. Find e₁₄ and write out the matrix.
e₁₄ = 3(1) − 4 = 3 − 4 = −1
E = [ 2 1 0 −1 ]
[ 5 4 3 2 ]
Answer: e₁₄ = −1
Matrices are combined element by element. Two matrices can be added or subtracted only when they have the same size, because each element needs a partner in the same position. A scalar is an ordinary number, and multiplying a matrix by a scalar multiplies every element.
Addition follows the same rules as for numbers: A + B = B + A, and k(A + B) = kA + kB. Adding the zero matrix leaves a matrix unchanged.
Example 1: Find A + B.
A = [ 1 2 ] B = [ 5 6 ]
[ 3 4 ] [ 7 8 ]
A + B = [ 6 8 ]
[ 10 12 ]
Each element of the sum is the sum of the two elements in the same position.
Example 2: Find C − D.
C = [ 9 8 ] D = [ 1 2 ]
[ 7 6 ] [ 3 4 ]
C − D = [ 8 6 ]
[ 4 2 ]
Example 3: Find kE for k = 3.
E = [ 1 0 ]
[ −1 2 ]
3E = [ 3 0 ]
[ −3 6 ]
Example 4: Add two 3 × 2 matrices F and G.
[ 2 4 ] [ 1 3 ]
F = [ 6 8 ] G = [ 5 7 ]
[ 10 12 ] [ 9 11 ]
[ 3 7 ]
F + G = [ 11 15 ]
[ 19 23 ]
Example 5: Find kH for k = −2.
H = [ 3 −1 ]
[ 0 4 ]
−2H = [ −6 2 ]
[ 0 −8 ]
Example 6: Two sensors record temperature (°C) at three points. The matrix of the first sensor is S₁ and that of the second is S₂. Find the matrix of average readings, ½(S₁ + S₂).
S₁ = [ 36 37 38 ] S₂ = [ 37 37 39 ]
S₁ + S₂ = [ 73 74 77 ] ½(S₁ + S₂) = [ 36.5 37 38.5 ]
Answer: the average readings are 36.5, 37 and 38.5 °C.
Some square matrices have patterns that make calculations shorter. They are used in image processing, in control systems and in the analysis of signals. The transpose of a matrix A, written Aᵀ, is formed by swapping its rows and columns; it is treated in full in Transpose of a matrix and properties.
Example 1: Show that multiplying by the identity matrix leaves A unchanged.
A = [ 2 3 ] I = [ 1 0 ]
[ 4 5 ] [ 0 1 ]
I × A = [ 1 0 ] × [ 2 3 ] = [ 2 3 ]
[ 0 1 ] [ 4 5 ] [ 4 5 ]
Each row of I picks out one row of A, so I × A = A.
Example 2: Multiply the diagonal matrices P and Q, and find P².
P = [ 2 0 ] Q = [ 4 0 ]
[ 0 3 ] [ 0 5 ]
P × Q = [ 8 0 ]
[ 0 15 ]
P² = [ 4 0 ]
[ 0 9 ]
The diagonal elements of P × Q are 2 × 4 = 8 and 3 × 5 = 15. The diagonal elements of P² are 2² = 4 and 3² = 9.
Example 3: Check whether A is symmetric.
A = [ 2 3 ] Aᵀ = [ 2 3 ]
[ 3 4 ] [ 3 4 ]
Aᵀ equals A, so A is symmetric.
Example 4: Check whether this 3 × 3 matrix is symmetric.
[ 1 7 2 ]
S = [ 7 0 5 ]
[ 2 5 3 ]
a₁₂ = a₂₁ = 7, a₁₃ = a₃₁ = 2 and a₂₃ = a₃₂ = 5, so every element equals its mirror image and S is symmetric.
Example 5: Check whether B is skew-symmetric.
B = [ 0 5 ] Bᵀ = [ 0 −5 ]
[ −5 0 ] [ 5 0 ]
Bᵀ = −B, and the diagonal elements are zero, so B is skew-symmetric.
Example 6: Split the matrix A into a symmetric part and a skew-symmetric part, using ½(A + Aᵀ) and ½(A − Aᵀ).
A = [ 1 4 ] Aᵀ = [ 1 2 ]
[ 2 3 ] [ 4 3 ]
½(A + Aᵀ) = [ 1 3 ]
[ 3 3 ]
½(A − Aᵀ) = [ 0 1 ]
[ −1 0 ]
Check: the two parts add up to A, because ½(A + Aᵀ) + ½(A − Aᵀ) = A. Adding the matrices above gives 1 + 0 = 1, 3 + 1 = 4, 3 + (−1) = 2 and 3 + 0 = 3, which are the elements of A.
Example 1: Verify that C is orthogonal.
C = [ 0 1 ] Cᵀ = [ 0 −1 ]
[ −1 0 ] [ 1 0 ]
Cᵀ × C = [ 0 −1 ] × [ 0 1 ] = [ 1 0 ]
[ 1 0 ] [ −1 0 ] [ 0 1 ]
The product is the identity matrix, so C is orthogonal.
Example 2: Show that D is singular.
D = [ 4 2 ]
[ 6 3 ]
|D| = (4)(3) − (2)(6) = 12 − 12 = 0
Answer: The determinant is zero, so D is singular.
Example 3: The matrix A has eigenvalues 4 and 3. Show how it is diagonalisable.
A = [ 4 1 ]
[ 0 3 ]
The eigenvalues are 4 and 3 (the diagonal elements of a triangular matrix). They are different, so A is diagonalisable as A = P D P⁻¹, where the columns of P are the eigenvectors of A and D is the matrix below.
D = [ 4 0 ]
[ 0 3 ]
Identify the type of matrix and its size for the matrix below:
\(\begin{bmatrix} 7 \\ 8 \\ 9 \end{bmatrix}\) (2 marks)
Find element \(a_{32}\) of matrix
\(\begin{bmatrix} 5 & 6 \\ 7 & 8 \\ 9 & 10 \end{bmatrix}\). (3 marks)
Add matrices
\(\begin{bmatrix} 1 & 0 \\ 4 & 5 \end{bmatrix}\) and \(\begin{bmatrix} 7 & 8 \\ 2 & 3 \end{bmatrix}\). (4 marks)
Multiply matrix \(\begin{bmatrix} 2 & -1 \\ 0 & 3 \end{bmatrix}\) by scalar \(-3\). (4 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 introduced the concept of matrices, defining them and exploring various types such as row, column, square, rectangular, diagonal, identity, and zero matrices. The notation and elements of matrices were explained, followed by basic operations including addition, subtraction, and scalar multiplication. Special matrices like identity, diagonal, symmetric, and skew-symmetric matrices were also covered. The chapter then detailed matrix multiplication, outlining the rules and properties including associative and distributive laws, and discussed the transpose of a matrix with its characteristics. Determinants for 2x2 and 3x3 matrices were calculated, and methods for finding inverses, such as the adjoint method and Gauss-Jordan elimination, were examined along with the conditions necessary for an inverse to exist. The use of matrices to represent systems of linear equations was introduced, followed by the application of Cramer's rule and the inverse matrix method to solve these systems. Finally, the inverse determinant method was presented as another approach for solving linear systems efficiently.
Given matrices
\( A = \begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} \)
and
\( B = \begin{bmatrix} 5 & 1 \\ 0 & 2 \end{bmatrix} \),
find \( A + B \). (2 marks)
Calculate the product of the scalar \( 4 \) and matrix
\( C = \begin{bmatrix} 1 & -2 \\ 3 & 0 \end{bmatrix} \). (2 marks)
A biomedical device manufacturer in Nairobi uses a 2x2 matrix to represent the calibration coefficients of two sensors. The matrix is $$ A = \begin{bmatrix} 1.2 & 0.5 \\ 0.3 & 1.1 \end{bmatrix} $$. Write down the order of matrix \(A\) and identify if it is square or rectangular. (4 marks)
Given matrices $$ B = \begin{bmatrix} 4 & 2 & 1 \end{bmatrix} $$ and$$ C = \begin{bmatrix} 3 \\ 5 \\ 7 \end{bmatrix} $$ find the product \( BC \). (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.