5.1, 5.2 - Multiplying matrices and the identity matrix

5.1, 5.2 - Multiplying matrices and the identity matrix

Use a matrix to organise numbers and carry out a calculation in a fixed order. In 5.1 you will multiply by a scalar, multiply a matrix by a column and multiply two matrices; in 5.2 you will discover the special matrix that leaves every input unchanged.

Rows, columns and scalar multiplication

Which four entries make a matrix leave every pair of numbers unchanged when you multiply? Four ones might sound promising, but the answer is more selective. First, learn how to read the grid.

A matrix keeps numbers or expressions in fixed positions. Those positions matter: swapping two entries usually changes what the matrix does.

Matrix and its order

A matrix is a rectangular array of entries inside brackets. Its order states rows first, then columns. For example, (2−304)\begin{pmatrix}2&-3\\0&4\end{pmatrix} has two horizontal rows and two vertical columns, so its order is 2×22\times2. A column (5−1)\begin{pmatrix}5\\-1\end{pmatrix} has order 2×12\times1; it is not a 1×21\times2 row.

We use bold capital letters, such as M\mathbf{M}, to name matrices. Equality of two matrices means that their orders agree and every corresponding entry agrees. Thus (a12b)=(312−4)\begin{pmatrix}a&1\\2&b\end{pmatrix}=\begin{pmatrix}3&1\\2&-4\end{pmatrix} gives a=3a=3 and b=−4b=-4.

A scalar is a single number multiplying a matrix. Unlike matrix multiplication, it acts separately on each entry.

Multiplication by a scalar

For a real scalar kk,

k(abcd)=(kakbkckd),k(xy)=(kxky)k\begin{pmatrix}a&b\\c&d\end{pmatrix} =\begin{pmatrix}ka&kb\\kc&kd\end{pmatrix}, \qquad k\begin{pmatrix}x\\y\end{pmatrix} =\begin{pmatrix}kx\\ky\end{pmatrix}

This does not change the matrix's order. The scalar may be negative, fractional or zero.
Not on the formulae sheet: learn it.

Multiply every entry, including zeros and negative entries. Keep the result in the same position.

Worked example 1: a positive scalar

Question. M=(2−304)\mathbf{M}=\begin{pmatrix}2&-3\\0&4\end{pmatrix}. Work out 3M3\mathbf{M}.

Plan. Multiply all four entries by 33.

3M=(3(2)3(−3)3(0)3(4))multiply each entry=(6−9012)keep the original positions\begin{aligned} 3\mathbf{M} &=\begin{pmatrix}3(2)&3(-3)\\3(0)&3(4)\end{pmatrix} && \text{multiply each entry}\\ &=\begin{pmatrix}6&-9\\0&12\end{pmatrix} && \text{keep the original positions} \end{aligned}

Why this step? A scalar multiplies the whole matrix, so no row or column is exempt.

Answer. (6−9012)\begin{pmatrix}6&-9\\0&12\end{pmatrix}.

Check. Dividing each new entry by 33 recovers M\mathbf{M}.

Worked example 2 changes only the scalar. A negative fraction reverses signs and halves magnitudes.

Worked example 2: a negative fractional scalar

Question. For the same M\mathbf{M}, work out −12M-\frac12\mathbf{M}.

Plan. Multiply each entry by −12-\frac12, retaining exact fractions.

−12M=(−12(2)−12(−3)−12(0)−12(4))multiply all entries=(−1320−2)evaluate signed products\begin{aligned} -\frac12\mathbf{M} &=\begin{pmatrix}-\frac12(2)&-\frac12(-3)\\-\frac12(0)&-\frac12(4)\end{pmatrix} && \text{multiply all entries}\\ &=\begin{pmatrix}-1&\frac32\\0&-2\end{pmatrix} && \text{evaluate signed products} \end{aligned}

Why this step? The top-right product has two negative factors, so its result is positive.

Answer. (−1320−2)\begin{pmatrix}-1&\frac32\\0&-2\end{pmatrix}.

Check. Multiplying the answer by −2-2 recovers every entry of M\mathbf{M}.

A zero scalar gives the zero matrix, whose entries are all zero. The zero matrix and the identity matrix are different; we will see why in the final part.

Watch out

Wrong: 3(2−304)=(6−304)3\begin{pmatrix}2&-3\\0&4\end{pmatrix}=\begin{pmatrix}6&-3\\0&4\end{pmatrix}. Only one entry was multiplied. Right: multiply every entry to get (6−9012)\begin{pmatrix}6&-9\\0&12\end{pmatrix}.

Try a new matrix and a negative whole-number scalar.

Multiplying a matrix by a column

A matrix times a column combines the input entries: each row produces one output by multiplying matching entries and adding the products.

For example, the row 2, −12,\,-1 acting on (3−1)\begin{pmatrix}3\\-1\end{pmatrix} gives 2(3)+(−1)(−1)=72(3)+(-1)(-1)=7. This is a row-times-column calculation, not a pair of separate outputs.

A matrix times a column

For a 2×22\times2 matrix and a 2×12\times1 column,

(abcd)(xy)=(ax+bycx+dy)\begin{pmatrix}a&b\\c&d\end{pmatrix} \begin{pmatrix}x\\y\end{pmatrix} =\begin{pmatrix}ax+by\\cx+dy\end{pmatrix}

The first row produces the top output; the second row produces the bottom output. The result has order 2×12\times1.
Not on the formulae sheet: learn it.

Keep the column on the right. The two entries in each row match the two entries in that column.

Worked example 3: calculating an output column

Question. Work out (2−131)(3−1)\begin{pmatrix}2&-1\\3&1\end{pmatrix}\begin{pmatrix}3\\-1\end{pmatrix}.

Plan. Use the first row for the top output and the second row for the bottom output.

(2−131)(3−1)=(2(3)+(−1)(−1)3(3)+1(−1))row times column=(6+19−1)evaluate products first=(78)add within each output\begin{aligned} \begin{pmatrix}2&-1\\3&1\end{pmatrix}\begin{pmatrix}3\\-1\end{pmatrix} &=\begin{pmatrix}2(3)+(-1)(-1)\\3(3)+1(-1)\end{pmatrix} && \text{row times column}\\ &=\begin{pmatrix}6+1\\9-1\end{pmatrix} && \text{evaluate products first}\\ &=\begin{pmatrix}7\\8\end{pmatrix} && \text{add within each output} \end{aligned}

Why this step? Each output uses a whole row, so the negative input affects both calculations.

Answer. (78)\begin{pmatrix}7\\8\end{pmatrix}.

Check. The two output rules are 2x−y2x-y and 3x+y3x+y; at x=3x=3, y=−1y=-1, they give 77 and 88.

Worked example 4 changes the direction of the task: the output is given and the input is unknown. The same multiplication rule now creates two equations.

Worked example 4: recovering an input

Question. (2−131)(xy)=(1114)\begin{pmatrix}2&-1\\3&1\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}11\\14\end{pmatrix}. Work out xx and yy.

Plan. Multiply symbolically, equate corresponding entries and solve the two linear equations.

2x−y=11top entries agree3x+y=14bottom entries agree5x=25add to eliminate yx=5divide by 5y=14−3(5)=−1substitute\begin{aligned} 2x-y&=11 && \text{top entries agree}\\ 3x+y&=14 && \text{bottom entries agree}\\ 5x&=25 && \text{add to eliminate }y\\ x&=5 && \text{divide by }5\\ y&=14-3(5)=-1 && \text{substitute} \end{aligned}

Why this step? Matrix equality gives two scalar equations. Write those equations explicitly before solving.

Answer. x=5x=5, y=−1y=-1.

Check. 2(5)−(−1)=112(5)-(-1)=11, and 3(5)+(−1)=143(5)+(-1)=14, recovering the supplied output.

This course uses only 2×22\times2 and 2×12\times1 matrices. A 2×12\times1 column cannot multiply a 2×22\times2 matrix from the left: its rows contain only one entry, so the row and column lengths do not match.

Watch out

Wrong: (abcd)(xy)=(axdy)\begin{pmatrix}a&b\\c&d\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}ax\\dy\end{pmatrix}. This ignores two entries. Right: (ax+bycx+dy)\begin{pmatrix}ax+by\\cx+dy\end{pmatrix}, using both products in each row.

Use new coefficients to recover an input yourself.

Multiplying two matrices

To multiply two 2×22\times2 matrices, treat each column of the right-hand matrix as a separate input column.

The first column produces the first output column; the second produces the second. Equivalently, the entry in row rr, column ss of the product comes from row rr of the left matrix multiplied by column ss of the right matrix.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account