C1, C2 - Calculating with matrices
A matrix keeps several numbers in a fixed arrangement, so that you can calculate with the whole arrangement at once. C1 introduces matrix size, addition, subtraction and scalar multiplication; C2 introduces the zero and identity matrices. You will see why the positions of the numbers matter just as much as their values.
Dimensions and conformability
Can two lists containing the same six numbers represent different matrices? Compare these arrangements:
The first has two horizontal rows and three vertical columns. The second has three rows and two columns. They are different matrices: the number 3 even occupies a different position.
Matrix and order
A matrix is a rectangular array of entries. Its order or dimensions are : number of rows first, number of columns second. A square matrix has the same number of rows and columns. A matrix is a row matrix; an matrix is a column matrix.
Thus has order , while has order . The notation means the entry of in row , column . Here , but does not exist. A matrix need not contain only integers: fractions, negative numbers and algebraic expressions can all be entries.
Two matrices are equal when their dimensions agree and every pair of corresponding entries is equal. For example,
To add or subtract matrices, each entry needs a partner in exactly the same position. The matrices must therefore have the same dimensions. Such matrices are conformable for addition or subtraction. Having the same total number of entries is insufficient: above is undefined. Conformability depends on the operation; multiplication will have a different size rule.
Watch out
A matrix has two rows, not two columns. Matrix order records an arrangement, not the product .
Use both dimensions in this check.
Addition, subtraction and scalar multiplication
Matrix addition acts entry by entry. For example, the top-right entry of a sum is the sum of the two top-right entries. Multiplying a matrix by a number, called a scalar, multiplies every entry by that number:
Subtraction means adding the negative of every entry in the second matrix. These operations leave the dimensions unchanged. Because they use ordinary arithmetic in corresponding positions, and whenever the sums are defined.
Worked example 1: a linear combination
Question. Find , where
Plan. Multiply every entry of by 2, then add corresponding entries.
Answer. .
Check. Subtracting from the answer gives , recovering the scaled matrix.
Keep both matrices and the scalar fixed. Change only addition to subtraction, so the signs in the second matrix become the important difference.
Worked example 2: subtracting a matrix
Question. For the same and , find .
Plan. Scale , then subtract each entry of , including its negative entry.
Answer. .
Check. Adding back gives . Its entries are exactly twice those of .
The calculation is a collection of familiar arithmetic steps, but all positions must be retained.
Watch out
Wrong: multiply only the diagonal entries by the scalar. Correct: every entry is multiplied. Likewise, a minus sign before a matrix changes every sign.
Try another subtraction with a scalar.
Zero and identity matrices
Ordinary arithmetic has special numbers: adding zero leaves a number unchanged, while multiplying by one leaves it unchanged. Matrices have corresponding special arrays, with dimensions built into their definitions.
Zero matrix
A zero matrix, written , has every entry zero. It can have any dimensions. For an matrix , the matching zero matrix satisfies and .
For example,
The dimensions are often clear from context and the subscript is omitted. The scalar zero and a zero matrix are different kinds of object, although both are written with a zero symbol. Multiplying every entry of any matrix by the scalar zero produces a zero matrix of the same dimensions.
A different special array is square:
Identity matrix
The identity matrix is the square matrix with 1 in every position on the main diagonal and 0 elsewhere. The main diagonal runs from top left to bottom right. The identity acts like 1 under matrix multiplication.
There is one identity matrix for each square size. A matrix filled entirely with ones is not an identity matrix. Nor does leave unchanged: addition increases its diagonal entries by 1. For example,
You will verify the multiplication property in the next lesson, once multiplication has been defined. Already, the opening puzzle is resolved: putting the same entries in a different arrangement can change the matrix's dimensions, the operations allowed and the meaning of the result.
Quick Recap
- Dimensions mean rows followed by columns; equal matrices have equal corresponding entries.
- Add and subtract only matrices of the same dimensions. A scalar multiplies every entry.
- A zero matrix has all entries zero; an identity matrix is square with diagonal ones and other entries zero.
An arrangement is part of a matrix's identity: the same six numbers can form different matrices.