Biomedical Engineering  ·  Level 5
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
  • determine the volume of solid shapes using the right mathematical techniques
  • work out the surface area of solids with accuracy
  • calculate the area of irregular figures correctly by applying appropriate methods

Mastering these skills will help you solve real-world engineering problems confidently and precisely, making your work reliable and effective.

2.1 Introduction to matrices

A matrix is a compact way of organising numbers in rows and columns so that large amounts of related data can be stored, compared and processed together. Businesses, schools, hospitals and farms already keep such data in tables, such as stock sheets, mark lists and feed schedules. Matrix algebra gives us rules for working with whole tables at once instead of one number at a time. This topic builds the vocabulary, notation and basic operations that the rest of the chapter depends on.

2.1.1 Definition of a matrix

A matrix is a rectangular arrangement of numbers, called elements or entries, set out in horizontal rows and vertical columns and enclosed in brackets. The size of a matrix is called its order, written m × n, where m is the number of rows and n is the number of columns. The number of rows is always stated first.

Example: A secondary school records the marks of three students in Mathematics, English and Kiswahili.

        Maths  English  Kiswahili
Asha  [  72      65        80   ]
Brian [  58      70        66   ]
Cheri [  81      77        69   ]

The matrix of marks is the block of nine numbers inside the brackets. It has 3 rows and 3 columns, so its order is 3 × 3. The words in the margins are labels for our understanding and are not part of the matrix.

The key terms are:

  • Element: a single number in the matrix. In the marks matrix, 70 is the element in the second row and second column.
  • Row: a horizontal line of elements. The second row, 58, 70, 66, holds all the marks of Brian.
  • Column: a vertical line of elements. The third column, 80, 66, 69, holds every student's Kiswahili mark.
  • Order: the size of the matrix, given as rows × columns. A matrix with 2 rows and 4 columns has order 2 × 4, read "two by four".

In running text, a matrix is sometimes written on one line with semicolons separating the rows. For example, [2 5; 7 1] means the matrix with first row 2, 5 and second row 7, 1.

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

Matrices are named according to their order and the pattern of their elements. Recognising the type quickly tells you which operations and shortcuts are available. For instance, only square matrices have a main diagonal, and this idea is used throughout the later topics.

  • Row matrix: a matrix with only one row, so its order is 1 × n. Example: the bags of maize delivered to a farm store on three days, [14 9 17], has order 1 × 3.
  • Column matrix: a matrix with only one column, so its order is m × 1. Example: [350; 420; 290] could show the daily room revenue of a hotel in Ksh thousands for three days, and has order 3 × 1.
  • Square matrix: a matrix with the same number of rows and columns, so m = n. A 3 × 3 matrix such as the marks matrix in 2.1.1 is a square matrix of order 3.
  • Rectangular matrix: a matrix whose number of rows differs from its number of columns, so m ≠ n. Example: [3 0 -1; 4 2 6] has 2 rows and 3 columns, so its order is 2 × 3. Row and column matrices are also rectangular.
  • Diagonal matrix: a square matrix in which every element off the main diagonal is zero. For example, [5 0; 0 -3] is a diagonal matrix of order 2. Its properties are developed in 2.1.5.1.
  • Identity matrix: a square matrix with 1 in every main diagonal position and 0 everywhere else, written I. For example, [1 0; 0 1] is the identity matrix of order 2. Its role is explained in 2.1.5.1.
  • Zero matrix: a matrix of any order in which every element is 0, written O. For example, the 2 × 3 zero matrix is [0 0 0; 0 0 0]. It plays the part of the number zero in addition.

2.1.3 Notation and elements of a matrix

Mathematicians use a fixed notation so that any matrix and any one of its elements can be named without ambiguity. The notation is the same for small tables and for very large ones, and it is the language used in every later topic.

The conventions are:

  • Naming a matrix: a matrix is named with a capital letter such as A, B or C. The elements are placed inside round or square brackets.
  • Naming an element: the element in row i and column j of matrix A is written aij, using the matching small letter. The row number always comes first. For example, a23 is the element in row 2, column 3.
  • General form: a matrix of order m × n is written A = [aij], with i running from 1 to m and j running from 1 to n.
  • Number of elements: a matrix of order m × n has m × n elements. A 3 × 4 matrix therefore has 12 elements.
  • Main diagonal: in a square matrix the elements a11, a22, a33 and so on, running from the top left to the bottom right, form the main diagonal.
  • Equality: two matrices are equal only if they have the same order and every pair of corresponding elements is equal.

Example: A hotel records the number of rooms booked from Monday to Thursday.

C =  [ 12  15   9  14 ]   Single
     [ 20  25  18  22 ]   Double
     [  4   6   5   8 ]   Suite

The matrix has 3 rows and 4 columns, so C has order 3 × 4 and 12 elements. The element c12 = 15 means that 15 single rooms were booked on Tuesday. The element c23 = 18 means that 18 double rooms were booked on Wednesday. The element c34 = 8 is the number of suites booked on Thursday.

Equality can be used to find unknown elements. If [x 3; 5 y] = [2 3; 5 7], the matrices have the same order, so corresponding elements must be equal. This gives x = 2 and y = 7.

2.1.4 Basic operations: addition, subtraction, scalar multiplication

Matrices can be added, subtracted and multiplied by an ordinary number, called a scalar. Addition and subtraction work position by position, so they are possible only when the matrices have exactly the same order. Scalar multiplication affects every element and is always possible.

Addition of matrices

To add two matrices of the same order, add the elements in corresponding positions. The result has the same order as the matrices being added.

Example: A SACCO records its monthly collections in Ksh thousands. Rows show shares and savings, and columns show Branch 1, Branch 2 and Branch 3.

January  J = [ 120   95   80 ]     February  F = [ 110  100   90 ]
             [  60   45   70 ]                    [  55   50   65 ]

Formula: J + F = [jij + fij]

Substitution and working:

J + F = [ 120+110   95+100   80+90 ]
        [  60+55    45+50    70+65 ]

Result:

J + F = [ 230  195  170 ]
        [ 115   95  135 ]

The total collected over the two months by Branch 2 for savings is 95 thousand, that is Ksh 95,000.

The procedure for adding or subtracting matrices is:

  1. Write down the order of each matrix.
  2. Compare the orders. If they differ, the operation is not defined and you must stop.
  3. Pair each element of the first matrix with the element in the same row and column of the second matrix.
  4. Add the paired elements for addition, or subtract the second from the first for subtraction. Take care with negative signs.
  5. Write each answer in the same row and column position in a new matrix.
  6. Check that the answer has the same order as the original matrices and that no position is left empty.

Subtraction of matrices

Subtraction follows the same rule as addition: the elements of the second matrix are subtracted from the corresponding elements of the first. The order of the matrices matters, because A − B is generally not equal to B − A.

Example: A hardware company with three outlets records opening stock S and units sold D. The rows are cement bags and iron sheets, and the columns are Outlet 1, Outlet 2 and Outlet 3.

S = [ 200  150   80 ]     D = [ 45  60  30 ]
    [ 120   90   60 ]         [ 25  40  20 ]

Formula: S − D = [sij − dij]

Substitution and working:

S − D = [ 200−45   150−60   80−30 ]
        [ 120−25    90−40   60−20 ]

Result:

S − D = [ 155  90  50 ]
        [  95  50  40 ]

The closing stock of iron sheets at Outlet 2 is 50 sheets.

Scalar multiplication

To multiply a matrix by a scalar k, multiply every element of the matrix by k. The order of the matrix does not change. Scalar multiplication is useful for scaling data, for example converting a per-unit table to a total for many units.

Example: On a dairy farm, one cow is fed per day the following amounts in kg. The rows are morning and evening, and the columns are hay and silage.

R = [ 4  6 ]
    [ 3  5 ]

Formula: 8R = [8 × rij]

Substitution and working:

8R = [ 8×4  8×6 ]
     [ 8×3  8×5 ]

Result:

8R = [ 32  48 ]
     [ 24  40 ]

The herd of 8 cows therefore needs 48 kg of silage each morning.

Multiplying by −1 changes the sign of every element. This shows that subtraction can be written as addition: A − B = A + (−1)B. As a further illustration, 3 × [2 -1 4; 0 5 -3] = [6 -3 12; 0 15 -9].

Properties of addition and scalar multiplication

For matrices A, B and C of the same order, and scalars k and m, the following hold:

  • Commutative law: A + B = B + A, so the order of addition does not matter.
  • Associative law: (A + B) + C = A + (B + C), so grouping does not matter.
  • Zero matrix: A + O = A, where O is the zero matrix of the same order as A.
  • Additive inverse: A + (−A) = O, where −A is the matrix with every sign of A reversed.
  • Distributing a scalar over matrices: k(A + B) = kA + kB.
  • Distributing a sum of scalars over a matrix: (k + m)A = kA + mA.

2.1.5 Special Matrices

Some square matrices have patterns in their elements that make them especially useful. They simplify calculations and represent real situations such as distances between places or balances between people. This section studies four of them in detail.

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

All four matrices below are square. Each is recognised by the relationship between its elements and the main diagonal.

Identity matrix:

The identity matrix of order n, written In or simply I, plays the role that the number 1 plays in ordinary arithmetic. When matrix multiplication is introduced later in this chapter, multiplying any matrix by an identity matrix of a suitable order will be seen to leave it unchanged. Its main properties are:

  • Uniqueness: there is exactly one identity matrix for each order n.
  • Shape: it is always square, because only a square matrix has a main diagonal to fill with ones.
  • Relation to diagonal matrices: it is a special diagonal matrix in which every diagonal element equals 1.
  • Element rule: its elements follow the rule iij = 1 when i = j and iij = 0 when i ≠ j.
  • Notation: the subscript gives the order, so I2 is 2 × 2 and I3 is 3 × 3.
I2 = [ 1  0 ]        I3 = [ 1  0  0 ]
     [ 0  1 ]             [ 0  1  0 ]
                          [ 0  0  1 ]

Diagonal matrix:

In a diagonal matrix the elements on the main diagonal may be any numbers, including zero, but every other element must be zero. The pattern is preserved by the basic operations: adding, subtracting or scaling diagonal matrices of the same order always gives another diagonal matrix.

Example:

[ 2  0 ]   [ 5   0 ]   [ 7  0 ]
[ 0  3 ] + [ 0  -1 ] = [ 0  2 ]

Only the diagonal entries need to be calculated, because the zeros in all other positions remain zeros. This makes diagonal matrices very quick to handle.

Symmetric matrix:

A square matrix is symmetric when each element equals its mirror image across the main diagonal, that is, aij = aji for every i and j. The rows read the same as the corresponding columns. To test a matrix, compare the element in row 1, column 2 with that in row 2, column 1, and continue for every pair of positions above and below the diagonal.

Example: The road distances in km between three depots of a transport contractor are given below (illustrative figures only).

D = [   0  160  350 ]
    [ 160    0  190 ]
    [ 350  190    0 ]

The distance from depot 1 to depot 3 is the same as from depot 3 to depot 1, so d13 = d31 = 350. The same holds for every pair, so D is symmetric. The diagonal of zeros shows that each depot is 0 km from itself. The sum of two symmetric matrices of the same order is also symmetric.

Skew-symmetric matrix:

A square matrix is skew-symmetric when aij = −aji for every i and j. Each element is the negative of its mirror image across the main diagonal. Putting i = j gives aii = −aii, which can only be true if aii = 0, so every main diagonal element of a skew-symmetric matrix must be zero.

Example: Three members of a SACCO settle their small debts to each other. The element aij is the net amount in Ksh hundreds that member j owes member i, so a negative value means member i owes member j.

N = [  0   4  -2 ]
    [ -4   0   6 ]
    [  2  -6   0 ]

Here n12 = 4 and n21 = −4, which describes the same debt from the two points of view. The same is true of n13 = −2 and n31 = 2, and of n23 = 6 and n32 = −6. Every diagonal entry is 0, because nobody owes themselves anything.

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 is the operation that combines two matrices into a single product matrix by multiplying rows by columns. It is used whenever one table of quantities must be combined with another table of rates, prices or coefficients. For example, a hote…

🔒2.3 Determinants and Inverses

A determinant is a single number calculated from the elements of a square matrix. It tells us whether the matrix can be reversed, and it is the key ingredient in finding the inverse of a matrix. The inverse of a matrix A, written A⁻¹, plays the same role as a…

🔒2.4 Solving Systems of Linear Equations

A system of linear equations is a set of two or more equations that share the same unknowns and must all be true at the same time. Such systems arise whenever several quantities are linked, for example when the unit prices of two spare parts are found from the…

🔒2.5 Using the inverse determinant method to solve linear systems.

The inverse determinant method solves a system of linear equations by writing it as a matrix equation AX = B and then finding the inverse of A from its determinant and adjoint. The solution is found by multiplying B by that inverse, so every unknown is obtaine…

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
  • determine the volume of solid shapes using the right mathematical techniques
  • work out the surface area of solids with accuracy
  • calculate the area of irregular figures correctly by applying appropriate 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.