By the end of this chapter, you will be able to:
Mastering these skills will empower you to tackle real-world business challenges and make confident, data-driven decisions in the workplace.
A matrix is a rectangular arrangement of numbers, called elements, set out in rows and columns and enclosed in brackets. Matrices let a business or institution store and handle large tables of figures as a single object. Example: a SACCO in Nyeri records the monthly savings of three members over four months, and the whole record is written as one matrix instead of twelve separate numbers. This topic introduces how a matrix is written, how its size (order) is stated, and the main types of matrices you will meet in the rest of the chapter.
A matrix is an ordered rectangular array of numbers or symbols arranged in horizontal rows and vertical columns. Rows are counted from top to bottom and columns from left to right. Matrices are named with capital letters such as A, B and C, and the array is enclosed in round or square brackets.
Example: a school canteen in Kisumu sells tea, mandazi and porridge. On Monday it sells 40, 25 and 30 portions, and on Tuesday 35, 30 and 28 portions. The sales are written as:
A = ( 40 25 30 )
( 35 30 28 )
Each row shows one day and each column shows one product.
The order (or size, or dimension) of a matrix states how many rows and how many columns it has. A matrix with m rows and n columns has order m × n, read as "m by n". The number of rows is always written first.
Example: a county office in Embu records the number of permits issued by three clerks in each of five weeks. The matrix has 3 rows and 5 columns.
Order = rows × columns
Order = 3 × 5
Number of elements = 3 × 5 = 15
A matrix of order 3 × 5 therefore holds 15 elements. The order tells you whether two matrices can later be added or multiplied, which is why it is always stated first.
Each number in a matrix is an element (or entry). The position of an element is given by two subscripts: aᵢⱼ is the element in row i and column j. The row number is written before the column number.
Example: a hotel in Mombasa records bed nights for two wings over three months.
B = ( 120 135 150 )
( 90 100 110 )
In matrix B:
In general, a matrix of order m × n is written with elements a₁₁, a₁₂, ... up to aₘₙ.
Matrices are named according to their order and the pattern of their elements. Knowing the type helps you choose the correct method when you add, multiply or find an inverse in later topics.
A row matrix has only one row, so its order is 1 × n. Example: the weekly milk deliveries of one dairy farm in Nakuru over four weeks.
R = ( 220 235 210 240 ) order 1 × 4
A column matrix has only one column, so its order is m × 1. Example: the unit prices in Ksh of three items stocked by a bookshop in Eldoret.
C = ( 450 )
( 300 )
( 120 ) order 3 × 1
A square matrix has the same number of rows and columns, so its order is n × n. The elements a₁₁, a₂₂, a₃₃ and so on form the main diagonal, which runs from the top left to the bottom right. Example: a bank in Thika records transfers between two of its branches in both directions.
S = ( 15 8 )
( 6 12 ) order 2 × 2
Determinants and inverses, treated later in this chapter, apply to square matrices.
A rectangular matrix has a different number of rows and columns (m ≠ n). Example: a contractor in Machakos records the bags of cement used on four sites in each of three weeks, giving a 4 × 3 matrix. Row and column matrices are special cases of rectangular matrices.
A zero matrix has every element equal to 0 and is written O. It can have any order. Example: a farm in Kericho that delivered no tea to any of three buyers in two months is described by the 2 × 3 zero matrix.
O = ( 0 0 0 )
( 0 0 0 )
A diagonal matrix is a square matrix in which every element outside the main diagonal is zero. The elements on the main diagonal may be any numbers. Example:
D = ( 5 0 0 )
( 0 8 0 )
( 0 0 2 )
A scalar matrix is a diagonal matrix whose main diagonal elements are all equal. Example:
K = ( 4 0 0 )
( 0 4 0 )
( 0 0 4 )
An identity matrix, written I, is a scalar matrix whose main diagonal elements are all 1. It plays the part that the number 1 plays in ordinary multiplication. The 2 × 2 and 3 × 3 identity matrices are:
I = ( 1 0 ) I = ( 1 0 0 )
( 0 1 ) ( 0 1 0 )
( 0 0 1 )
A triangular matrix is a square matrix with all zeros on one side of the main diagonal. In an upper triangular matrix the zeros are below the diagonal, and in a lower triangular matrix the zeros are above it.
Upper: ( 3 5 1 ) Lower: ( 3 0 0 )
( 0 2 4 ) ( 5 2 0 )
( 0 0 6 ) ( 1 4 6 )
A symmetric matrix is a square matrix in which aᵢⱼ = aⱼᵢ for every pair of positions, so the matrix is a mirror image of itself across the main diagonal. Example: the distances in kilometres between two depots of a transport company are the same in both directions.
M = ( 0 35 )
( 35 0 )
Two matrices are equal only when they have the same order and every pair of corresponding elements is equal. If the orders differ, or even one corresponding pair differs, the matrices are not equal.
Example: if
( x 3 ) ( 5 y )
( 4 7 ) = ( 4 7 )
then the first elements must match and the second elements must match.
x = 5
y = 3
Equal matrices are used to form equations: each pair of corresponding elements gives one equation to solve for an unknown.
The transpose of a matrix A, written Aᵀ, is formed by changing its rows into columns, so the first row becomes the first column, the second row becomes the second column, and so on. If A has order m × n, then Aᵀ has order n × m.
Example: a pharmacy in Kakamega records the stock of two drugs in three stores.
A = ( 12 18 9 ) Aᵀ = ( 12 7 )
( 7 14 20 ) ( 18 14 )
( 9 20 )
order 2 × 3 order 3 × 2
A square matrix is symmetric exactly when it equals its own transpose (Aᵀ = A).
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountAt 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.