Biomedical Engineering  ·  Level 6
Engineering Mathematics II

Chapter 2: Apply matrices

📚 5 Topics
⚑ What you will be able to do

By the end of this chapter, you will be able to:

  • calculate the perimeter of regular figures correctly using mathematical methods
  • find the areas of regular figures accurately using mathematical methods
  • determine the volume of solids accurately using mathematical methods
  • calculate the surface area of solids correctly using mathematical methods
  • find the area of irregular figures accurately using appropriate mathematical methods

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.

2.1 Introduction to matrices

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.

2.1.1 Definition of a matrix

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.

2.1.2 Different types of matrices: row, column, square, rectangular, diagonal, identity, zero

Matrices are named by their shape and by the pattern of their elements. Recognising the type tells a technician which operations are allowed.

  • Row matrix: has one row, size 1 × n. Example: the readings of several sensors at one instant.
  • Column matrix: has one column, size m × 1. Example: the vital signs of one patient simulator listed down a column.
  • Square matrix: has the same number of rows and columns, size n × n. System models are often written with square matrices.
  • Rectangular matrix: has different numbers of rows and columns (m is not equal to n). Data tables are usually rectangular.
  • Diagonal matrix: a square matrix whose elements are zero everywhere except on the main diagonal, the line from the top left to the bottom right.
  • Identity matrix: a diagonal matrix with ones on the main diagonal. It is written I, and it plays the part that the number 1 plays in ordinary multiplication.
  • Zero matrix: all elements are zero. It plays the part of the number 0 in addition.

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.

2.1.3 Notation and elements of a 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

2.1.4 Basic operations: addition, subtraction, scalar multiplication

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: (A + B)ᵢⱼ = aᵢⱼ + bᵢⱼ
  • Subtraction: (A − B)ᵢⱼ = aᵢⱼ − bᵢⱼ
  • Scalar multiplication: (kA)ᵢⱼ = k × aᵢⱼ, where k is a scalar. It can be applied to a matrix of any size.

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.

2.1.5 Special Matrices

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.

2.1.5.1 Identity matrix, diagonal matrix, symmetric matrix, skew-symmetric matrix

  • Identity matrix: I has ones on the main diagonal and zeros elsewhere. For any square matrix A of the same size, A × I = I × A = A, so multiplying by I changes nothing.
  • Diagonal matrix: non-zero elements, if any, lie only on the main diagonal. Two diagonal matrices of the same size multiply by multiplying their diagonal elements one by one, and a diagonal matrix raised to a power has each diagonal element raised to that power.
  • Symmetric matrix: A = Aᵀ, so aᵢⱼ = aⱼᵢ and the matrix is a mirror image about its main diagonal. Covariance matrices in signal analysis are symmetric.
  • Skew-symmetric matrix: Aᵀ = −A, so aⱼᵢ = −aᵢⱼ. Every element on the main diagonal must be zero, because aᵢᵢ = −aᵢᵢ only when aᵢᵢ = 0.

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.

Other special matrices

  • Orthogonal matrix: Aᵀ × A = I. It represents a rotation or reflection and preserves lengths.
  • Singular matrix: a square matrix whose determinant is zero. It has no inverse, which matters when a system of equations is solved (see Determinants and Inverses).
  • Diagonalisable matrix: can be written A = P D P⁻¹, where D is a diagonal matrix. The diagonal elements of D are the eigenvalues 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 ]

Practice Questions

  1. Write the matrix representation of a 3-lead ECG signal recorded at 4 time points. (3 marks)
  2. Identify the type of matrix and its size for the matrix below:
    \(\begin{bmatrix} 7 \\ 8 \\ 9 \end{bmatrix}\) (2 marks)

  3. Find element \(a_{32}\) of matrix
    \(\begin{bmatrix} 5 & 6 \\ 7 & 8 \\ 9 & 10 \end{bmatrix}\). (3 marks)

  4. Add matrices
    \(\begin{bmatrix} 1 & 0 \\ 4 & 5 \end{bmatrix}\) and \(\begin{bmatrix} 7 & 8 \\ 2 & 3 \end{bmatrix}\). (4 marks)

  5. Multiply matrix \(\begin{bmatrix} 2 & -1 \\ 0 & 3 \end{bmatrix}\) by scalar \(-3\). (4 marks)

  6. Determine if matrix
    \(\begin{bmatrix} 0 & 2 \\ -2 & 0 \end{bmatrix}\) is skew-symmetric. (4 marks)
The rest of this chapter
🔒

Create a free account to open more of this chapter.

Free: practical guides, quick cards, workplace scenarios and more.

Create a free account
🔒2.2 Matrix Multiplication

Matrix multiplication combines two matrices into a new matrix and is not the same as multiplying element by element. It is used whenever one set of quantities is converted into another: a set of raw sensor readings into calibrated values, the pixel values of a…

🔒2.3 Determinants and Inverses

Determinants and inverses are crucial in biomedical engineering computations such as solving systems of linear equations in physiological modeling or image processing algorithms. In Kenyan biomedical research, accurate inversion of matrices supports calibratio…

🔒2.4 Solving Systems of Linear Equations

Solving systems of linear equations is fundamental in biomedical engineering, especially when modeling physiological systems, analyzing signals, or designing medical devices. In Kenyan biomedical contexts such as hospital equipment calibration or biomedical da…

🔒2.5 Using the inverse determinant method to solve linear systems

In biomedical engineering applications within Kenya, solving systems of linear equations is essential for modeling physiological systems, analyzing biomedical signals, and designing medical devices. The inverse determinant method provides a reliable approach t…

Chapter Summary

This 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.

Self-Assessment

🔒 PDFDownload this self-assessment, with answers

Written Assessment

  1. 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)

  2. Calculate the product of the scalar \( 4 \) and matrix
    \( C = \begin{bmatrix} 1 & -2 \\ 3 & 0 \end{bmatrix} \). (2 marks)

🔒8 more in this section.

Chapter Examination Questions

🔒 PDFDownload these examination questions, with worked answers

SECTION A (40 Marks) - Answer ALL Questions

  1. 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)

  2. 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)

🔒18 more in this section.
Flashcards 20 cards Study deck ▾
Question
1

↻ Tap card to reveal answer
🔒

18 more in this section.

Create a free account
Test Yourself 19 questions Start quiz ▾
0%
0 / 2
🔒

17 more in this section.

Create a free account
Am I competent?

At the start of this chapter we promised you would be able to:

  • calculate the perimeter of regular figures correctly using mathematical methods
  • find the areas of regular figures accurately using mathematical methods
  • determine the volume of solids accurately using mathematical methods
  • calculate the surface area of solids correctly using mathematical methods
  • find the area of irregular figures accurately using appropriate mathematical methods

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.