By the end of this chapter, you will be able to:
Mastering this skill helps you analyze and predict changes in many technical and scientific fields, making you a valuable problem solver in your trade.
Compiled by: Kevin Rotich
Matrices are essential mathematical tools in science laboratory technology for organizing, analyzing, and solving systems of linear equations that arise in experiments and data processing. They allow laboratory professionals to handle complex data sets, perform transformations, and model interactions in chemical analysis, quality control, and instrumentation calibration. Mastery of matrices equips technologists with the ability to apply computational methods efficiently, enhancing accuracy and reliability in laboratory results.
Matrices provide a compact way to represent and manipulate data arranged in rows and columns, widely used in scientific calculations and computer programming within laboratory settings. Understanding matrix types, orders, and operations is fundamental for handling data matrices from experiments, such as spectrophotometric readings or chromatographic peak areas.
Matrices are classified into various types based on their shape and element properties, which influence how they can be used in calculations.
A square matrix has the same number of rows and columns, denoted as an n × n matrix. Square matrices are important in laboratory computations involving determinants and inverses, such as solving simultaneous linear equations describing chemical equilibria.
A row matrix contains only one row and multiple columns, represented as 1 × n. This type is often used to represent single sets of measurements or observations in a laboratory experiment.
A column matrix has one column and multiple rows, denoted m × 1. It is commonly used to represent vectors such as concentration profiles or instrument calibration data.
A zero matrix consists entirely of zero elements and can be of any order. It serves as the additive identity in matrix algebra, useful in error checking and baseline correction in lab data.
A diagonal matrix is a square matrix where all off-diagonal elements are zero. This type simplifies many matrix operations, such as scaling factors in data normalisation.
A singular matrix is a square matrix whose determinant is zero. It has no inverse. The rows of a singular matrix are not independent of each other: one row is a multiple of another row, or can be built from the other rows. Only square matrices can be singular or non-singular, because only square matrices have a determinant. For a 2 × 2 matrix with elements a, b, c and d, the determinant is ad − bc, and its calculation is set out in Determinant of a 2x2 matrix.
In laboratory calculations, a singular coefficient matrix warns that a set of simultaneous equations carries the same information more than once, so the unknowns cannot be fixed to single values. This happens, for example, when two readings are taken on mixtures made in the same ratio.
Example: Two readings taken on mixtures of the same two reagents, in the same ratio, give the equations 6x + 9y = 30 and 2x + 3y = 10 in the unknowns x and y. Show that the coefficient matrix is singular.
The coefficient matrix and its determinant are:
M = | 6 9 |
| 2 3 |
det(M) = 6 × 3 − 9 × 2 = 18 − 18 = 0
The determinant is zero, so M is singular. Row 1 is 3 times row 2, and the first equation is 3 times the second (30 = 3 × 10), so the two readings give only one equation. Many pairs of values satisfy both, and x and y cannot be found uniquely.
Answer: M is singular, because det(M) = 0.
A non-singular matrix is a square matrix whose determinant is not zero. It has an inverse, which is a matrix that multiplies with it to give the identity matrix. Its rows are independent, so simultaneous equations written with it have exactly one solution. The identity matrix is non-singular (its determinant is 1), and a diagonal matrix is non-singular when none of its diagonal elements is zero. The method of finding the inverse is given in Determinant and inverse of 2x2 matrix.
Example: Two different mixtures of the same two reagents give the equations 5x + 2y = 16 and 3x + 4y = 18. Decide whether the coefficient matrix is singular.
N = | 5 2 |
| 3 4 |
det(N) = 5 × 4 − 2 × 3 = 20 − 6 = 14
The determinant is 14, which is not zero, so N is non-singular. The rows are not multiples of each other, so the two readings carry different information. The pair x = 2 and y = 3 satisfies both equations (5 × 2 + 2 × 3 = 16 and 3 × 2 + 4 × 3 = 18), and it is the only pair that does.
Answer: N is non-singular, because det(N) = 14.
The identity matrix is a special diagonal matrix with all diagonal elements equal to 1, denoted Iₙ. It acts as the multiplicative identity and is critical in matrix inversion and system stability analysis.
The identity matrices of order 2 and order 3 are:
| 1 0 | | 1 0 0 |
I₂ = | 0 1 | I₃ = | 0 1 0 |
| 0 0 1 |
For any square matrix A of the same order, A × I = I × A = A, in the way that multiplying a number by 1 leaves it unchanged.
A symmetric matrix equals its transpose, A = Aᵀ, often arising in covariance matrices in laboratory statistics.
An echelon matrix, also called a matrix in row echelon form, is a matrix with a staircase pattern of non-zero entries. Three conditions describe it:
The matrices below show one that is in echelon form and one that is not:
| 2 3 1 | | 0 1 |
P = | 0 0 4 | Q = | 1 0 |
| 0 0 0 |
P is in echelon form: its leading entries, 2 and 4, move to the right as the rows go down, and the zero row is at the bottom. Q is not in echelon form, because the leading entry of row 2 is in column 1, to the left of the leading entry of row 1.
Echelon form is reached by row operations, which are adding a multiple of one row to another row, swapping two rows, or multiplying a row by a non-zero number. It is the basis of the elimination method for solving simultaneous equations. A square matrix that reduces to echelon form with no zero row is non-singular, and one that ends with a zero row is singular.
Example: Reduce the matrix below to echelon form.
| 1 2 1 |
R = | 2 5 4 |
| 3 6 5 |
Step 1: replace row 2 by row 2 − 2 × row 1, so (2, 5, 4) − 2 × (1, 2, 1) = (0, 1, 2)
Step 2: replace row 3 by row 3 − 3 × row 1, so (3, 6, 5) − 3 × (1, 2, 1) = (0, 0, 2)
The result is:
| 1 2 1 |
R = | 0 1 2 |
| 0 0 2 |
The leading entries 1, 1 and 2 are in columns 1, 2 and 3, each to the right of the one above, and every element below them is zero. There is no zero row, so the original matrix is non-singular.
Answer: The echelon form of R is the matrix shown above.
Example 1: Identify the type of matrix with elements arranged as 3 rows and 3 columns with zeros except the diagonal elements 2, 4, 6.
Given: Matrix order 3 × 3, non-zero diagonal elements.
A diagonal matrix satisfies:
| 2 0 0 |
A = | 0 4 0 |
| 0 0 6 |
Answer: Diagonal matrix
Example 2: Determine if the matrix below is symmetric:
| 5 7 2 |
A = | 7 1 0 |
| 2 0 3 |
Calculate transpose Aᵀ:
| 5 7 2 |
Aᵀ = | 7 1 0 |
| 2 0 3 |
Since A = Aᵀ,
Answer: Matrix A is symmetric
Example 3: Classify the matrix:
B = | 4 5 6 |
Dimensions: 1 × 3
Answer: Row matrix
Example 4: Classify the matrix:
| 1 |
| 3 |
C = | 7 |
| 9 |
Dimensions: 4 × 1
Answer: Column matrix
Example 5: Identify the zero matrix from:
| 0 0 |
D = | 0 0 |
All elements zero.
Answer: Zero matrix
The order of a matrix defines its dimensions, essential for determining the feasibility of matrix operations such as addition, multiplication, and inversion in laboratory data analysis.
The order is expressed as m × n, where m is the number of rows and n is the number of columns.
Order = m × n
Example 1: Find the order of the matrix:
| 12 7 |
A = | 5 3 |
| 8 4 |
Count rows: 3, columns: 2
Answer: Order is 3 × 2
Example 2: If a matrix represents 5 different chemical samples each with 4 measured parameters, what is the matrix order?
Samples = 5 rows, parameters = 4 columns
Answer: Order is 5 × 4
Example 3: A data matrix has 7 rows and 1 column representing absorbance values at different wavelengths. Determine the order.
Rows = 7, columns = 1
Answer: Order is 7 × 1
Example 4: A square matrix has order n × n. If n = 6, what is the order?
Answer: Order is 6 × 6
Example 5: A matrix with 2 rows and 8 columns is used to store instrument calibration data. What is the order?
Answer: Order is 2 × 8
Matrix operations are the basis for manipulating and analysing data sets in science laboratory technology, including addition, subtraction, multiplication, and scalar multiplication.
Matrices can be added or subtracted only if they have the same order. The operation is performed element-wise.
(A + B)ᵢⱼ = Aᵢⱼ + Bᵢⱼ
(A − B)ᵢⱼ = Aᵢⱼ − Bᵢⱼ
Element-wise means that each element of one matrix is combined with the element of the other matrix that sits in the same row and the same column. The result has the same order as the two matrices, so adding or subtracting two 3 × 3 matrices gives a 3 × 3 matrix. In laboratory work the two matrices must also mean the same thing in each position: the same sample in each row, the same reading or test in each column, and the same units throughout. Adding a table of milligrams to a table of grams, or a table in which the rows are samples to one in which the rows are replicates, gives numbers that look correct and mean nothing. Whether two matrices have orders that allow the operation is treated in Compatibility of matrices.
Addition and subtraction follow these rules, which let a long sum of data tables be rearranged and checked:
To add or subtract two matrices of data, follow these steps:
Example 1: A soil-testing laboratory sieves two sub-samples of each of three soil samples. The masses retained (g) on the 2.00 mm, 1.00 mm and 0.50 mm sieves are written with the samples as rows and the sieves as columns. S1 holds the first sub-samples and S2 the second. Find the combined mass retained on each sieve for each soil sample.
| 12.4 25.1 8.3 |
S1 = | 9.8 30.2 11.5 |
| 15.0 20.6 6.9 |
| 11.9 24.7 7.6 |
S2 = | 10.3 29.5 12.1 |
| 14.2 21.4 7.2 |
Both matrices are 3 × 3 and in grams, so they can be added. Each element of S1 is added to the element of S2 in the same position:
Row 1: 12.4 + 11.9 = 24.3, 25.1 + 24.7 = 49.8, 8.3 + 7.6 = 15.9
Row 2: 9.8 + 10.3 = 20.1, 30.2 + 29.5 = 59.7, 11.5 + 12.1 = 23.6
Row 3: 15.0 + 14.2 = 29.2, 20.6 + 21.4 = 42.0, 6.9 + 7.2 = 14.1
| 24.3 49.8 15.9 |
S1 + S2 = | 20.1 59.7 23.6 |
| 29.2 42.0 14.1 |
Check: subtracting S2 from the sum gives back S1, for example 24.3 − 11.9 = 12.4 in the first position. Adding in the other order, S2 + S1, gives the same matrix.
Answer: The combined masses retained (g) are the matrix S1 + S2 above, of order 3 × 3.
Example 2: A teaching laboratory reads the absorbance of three coloured dye solutions three times each in a colorimeter. R holds the raw readings, with the solutions as rows and the three replicate readings as columns. Each reading was paired with a solvent blank read in the same run, and these are held in B. Find the blank-corrected absorbances.
| 0.412 0.408 0.415 |
R = | 0.287 0.291 0.285 |
| 0.536 0.531 0.540 |
| 0.011 0.012 0.010 |
B = | 0.013 0.011 0.012 |
| 0.010 0.012 0.011 |
The corrected reading is the raw reading minus its blank, so the matrix to find is R − B. Both matrices are 3 × 3.
Row 1: 0.412 − 0.011 = 0.401, 0.408 − 0.012 = 0.396, 0.415 − 0.010 = 0.405
Row 2: 0.287 − 0.013 = 0.274, 0.291 − 0.011 = 0.280, 0.285 − 0.012 = 0.273
Row 3: 0.536 − 0.010 = 0.526, 0.531 − 0.012 = 0.519, 0.540 − 0.011 = 0.529
| 0.401 0.396 0.405 |
R − B = | 0.274 0.280 0.273 |
| 0.526 0.519 0.529 |
Answer: The blank-corrected absorbances are the matrix R − B above. Each replicate has been corrected with its own blank, which one blank value subtracted from the whole table would not do.
Example 3: A dairy testing laboratory measures the fat content (%) of milk from three collection tanks at three sampling times, in week 1 and again in week 2. F1 holds the week 1 values and F2 the week 2 values, with tanks as rows and sampling times as columns. Find the matrix of changes in fat content, and say what happens if the subtraction is written the other way round.
| 3.8 4.1 3.9 |
F1 = | 4.0 3.7 4.2 |
| 3.6 3.9 4.0 |
| 4.0 4.2 3.7 |
F2 = | 3.9 3.9 4.3 |
| 3.7 3.8 4.2 |
The change is the later reading minus the earlier one, so the matrix to find is F2 − F1:
Row 1: 4.0 − 3.8 = 0.2, 4.2 − 4.1 = 0.1, 3.7 − 3.9 = −0.2
Row 2: 3.9 − 4.0 = −0.1, 3.9 − 3.7 = 0.2, 4.3 − 4.2 = 0.1
Row 3: 3.7 − 3.6 = 0.1, 3.8 − 3.9 = −0.1, 4.2 − 4.0 = 0.2
| 0.2 0.1 −0.2 |
F2 − F1 = | −0.1 0.2 0.1 |
| 0.1 −0.1 0.2 |
A positive element means that the fat content rose and a negative element means that it fell. Written the other way round, F1 − F2 gives the same numbers with every sign changed, so 0.2 becomes −0.2 and −0.2 becomes 0.2. The size of each change is the same, but the signs would now read as rises where there were falls.
Answer: The matrix of changes is F2 − F1 above. Fat content rose in six of the nine positions and fell in three.
Example 4: An industrial quality-control laboratory tests filled bottles from two filling lines for under-fill, cap leaks and label faults. W1 and W2 hold the number of faulty bottles found in the samples of week 1 and week 2, with the lines as rows and the three faults as columns. After retesting, some bottles were found to have been wrongly rejected, and these are held in Rc. Find the net number of faulty bottles in the two weeks.
| 14 9 5 |
W1 = | 11 6 8 |
| 10 12 4 |
W2 = | 13 5 7 |
| 6 5 2 |
Rc = | 8 3 4 |
The net number is W1 + W2 − Rc. All three matrices are 2 × 3. Add first, then subtract:
| 24 21 9 |
W1 + W2 = | 24 11 15 |
| 18 16 7 |
W1 + W2 − Rc = | 16 8 11 |
Check by adding Rc back to the result: 18 + 6 = 24, which agrees with the first element of W1 + W2.
Answer: The net numbers of faulty bottles are the matrix W1 + W2 − Rc above, of order 2 × 3.
Multiplying a matrix by a scalar involves multiplying every element by the scalar. A scalar is a single number, such as a dilution factor, a conversion factor or a calibration constant. The order of the matrix does not change.
(kA)ᵢⱼ = k × Aᵢⱼ
The rules below follow from this definition:
Example 1: The concentrations (mg/L) of two analytes in three water samples, read after dilution, are written as a 3 × 2 matrix M. Each sample was diluted by a factor of 5 before reading. Find the matrix of concentrations in the undiluted samples.
| 4.2 3.8 |
M = | 5.5 6.1 |
| 3 2.7 |
The undiluted concentrations are 5M, so every element is multiplied by 5:
| 21 19 |
5M = | 27.5 30.5 |
| 15 13.5 |
Written with the working: 5 × 4.2 = 21, 5 × 3.8 = 19, 5 × 5.5 = 27.5, 5 × 6.1 = 30.5, 5 × 3 = 15 and 5 × 2.7 = 13.5.
Answer: The matrix of undiluted concentrations is 5M above, of order 3 × 2.
Example 2: Multiply the matrix K by the scalar −2.
| 3 −1 |
K = | 0 4 |
Multiply every element by −2:
| −6 2 |
−2K = | 0 −8 |
Working: −2 × 3 = −6, −2 × (−1) = 2, −2 × 0 = 0 and −2 × 4 = −8.
Answer: −2K is the matrix shown above.
Example 3: Take out the largest common factor of the elements of the matrix.
| 6 9 |
T = | 3 12 |
Every element is divisible by 3, so T = 3 × (T ÷ 3):
| 6 9 | = 3 × | 2 3 |
T = | 3 12 | | 1 4 |
Answer: T = 3 times the matrix with rows (2, 3) and (1, 4).
Two matrices are compatible for an operation when their orders allow the operation to be carried out. Order is always written as rows × columns, and compatibility is decided from the orders alone, before any element is worked out. Checking it first prevents a technologist from starting a calculation that cannot be completed.
| Operation | Condition for compatibility | Order of the result |
|---|---|---|
| A + B or A − B | A and B have exactly the same order | The same order as A and B |
| kA (scalar) | Always possible | The same order as A |
| A × B | Number of columns of A equals number of rows of B | Rows of A by columns of B |
Compatibility for A × B does not mean that B × A is also possible, and where both exist they are usually different matrices, so the order of the factors matters.
Example 1: P is a 3 × 2 matrix of 3 water samples with 2 parameters each, and Q is a 2 × 4 matrix of the weights of 2 parameters in 4 quality indices. Decide whether P × Q and Q × P can be worked out.
For P × Q: columns of P = 2 and rows of Q = 2. They are equal, so P × Q is compatible, and its order is 3 × 4 (rows of P by columns of Q).
For Q × P: columns of Q = 4 and rows of P = 3. They are not equal, so Q × P is not compatible.
Answer: P × Q is possible and has order 3 × 4. Q × P is not possible.
Example 2: X and Y are 2 × 3 matrices and Z is a 3 × 2 matrix. State which of X + Y, X + Z, X × Z and Z × X are compatible, with the order of each result.
Answer: X + Y (2 × 3), X × Z (2 × 2) and Z × X (3 × 3) are compatible, and X + Z is not. X × Z and Z × X have different orders, so they cannot be equal.
Matrix multiplication is defined when the number of columns in the first matrix equals the number of rows in the second matrix. The resulting matrix has the order of the rows of the first and columns of the second matrix.
(AB)ᵢⱼ = Σ Aᵢₖ × Bₖⱼ, summed over k = 1 to n
The transpose of a matrix A is denoted Aᵀ, obtained by interchanging rows and columns.
(Aᵀ)ᵢⱼ = Aⱼᵢ
Example 1: Add matrices:
| 3 5 | , | 1 7 |
A = | 2 4 | B = | 6 3 |
Check order: both 2 × 2
Calculate:
| 3 + 1 5 + 7 | = | 4 12 |
A + B = | 2 + 6 4 + 3 | | 8 7 |
Answer:
| 4 12 |
A + B = | 8 7 |
Example 2: Subtract matrices:
| 8 3 | , | 2 5 |
C = | 4 1 | D = | 1 0 |
Calculate:
| 8 − 2 3 − 5 | = | 6 −2 |
C − D = | 4 − 1 1 − 0 | | 3 1 |
Answer:
| 6 −2 |
C − D = | 3 1 |
Example 3: Multiply matrix by scalar k = 4:
| 1 2 |
E = | 3 0 |
Calculate:
| 4 × 1 4 × 2 | = | 4 8 |
4E = | 4 × 3 4 × 0 | | 12 0 |
Answer:
| 4 8 |
4E = | 12 0 |
Example 4: Multiply matrices:
| 2 3 | , | 5 1 |
F = | 1 4 | G = | 2 3 |
Check order: F is 2 × 2, G is 2 × 2, multiplication possible.
Calculate:
| (2 × 5 + 3 × 2) (2 × 1 + 3 × 3) |
FG = | (1 × 5 + 4 × 2) (1 × 1 + 4 × 3) |
FG = | (10 + 6) (2 + 9) | = | 16 11 |
| (5 + 8) (1 + 12) | | 13 13 |
Answer:
| 16 11 |
FG = | 13 13 |
Example 5: Find transpose of matrix:
| 7 4 1 |
H = | 2 5 3 |
Calculate:
| 7 2 |
Hᵀ = | 4 5 |
| 1 3 |
Answer:
| 7 2 |
Hᵀ = | 4 5 |
| 1 3 |
Given matrices
\[
A = \begin{bmatrix} 4 & 6 \\ 3 & 8 \end{bmatrix},
B = \begin{bmatrix} 1 & 5 \\ 7 & 2 \end{bmatrix}
\]
find \(A + B\). (4 marks)
Multiply the matrix
\[
C = \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix}
\]
by the scalar 5. (3 marks)
Calculate the product of matrices
\[
D = \begin{bmatrix} 1 & 4 \\ 2 & 5 \end{bmatrix}
\]
and
\[
E = \begin{bmatrix} 3 & 1 \\ 0 & 2 \end{bmatrix}
\]
. (5 marks)
Find the transpose of the matrix
\[
F = \begin{bmatrix} 6 & 7 & 8 \\ 1 & 2 & 3 \end{bmatrix}
\]
. (3 marks)
Subtract matrix
\[
G = \begin{bmatrix} 9 & 4 \\ 3 & 7 \end{bmatrix}
\]
from
\[
H = \begin{bmatrix} 5 & 6 \\ 8 & 2 \end{bmatrix}
\]
. (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 fundamental concepts of matrices, starting with various types such as singular, non-singular, identity, and echelon matrices. Understanding the order of matrices was essential for performing valid operations, including addition, subtraction, scalar multiplication, and matrix multiplication, with attention to compatibility rules. The chapter then focused on calculating the determinant and inverse of a 2x2 matrix, providing the foundation for solving linear systems. The matrix method for solving simultaneous equations was explored, demonstrating how matrices can efficiently handle multiple variables. Finally, the concepts of eigenvalues and eigenvectors were presented, highlighting their significance in understanding matrix behavior and transformations. This comprehensive coverage equips students with the skills to apply matrices effectively in scientific and engineering problems.
Given matrices \( A = \begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} \) and \( B = \begin{bmatrix} 5 & 1 \\ 0 & 2 \end{bmatrix} \), calculate \( A + B \). (2 marks)
Multiply matrix \( C = \begin{bmatrix} 4 & 7 \\ 2 & 5 \end{bmatrix} \) by scalar 3. (2 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.