←
Mathematics — Grade 12, Part I
MATRICES · 3 / 6
⌕
Chapter 3 of 6

MATRICES

34 sections · 10,454 words

Chapter 3: Matrices

29 words · 1 min read

Chapter 3

Matrices

Big idea: a whole table of numbers can be treated as one object, and then added, scaled, multiplied, flipped and undone, just like a single number.

3.1 Introduction

278 words · 1 min read

A matrix is a table of numbers that is treated as one single object. Tables like this are everywhere:

  • A spreadsheet: every number has a row and a column.
  • A photo on a screen: the screen is a grid of tiny dots (pixels), and every dot has a number for its brightness.
  • A game scoreboard: players go down the side and rounds go across the top.
  • A weather chart: cities go down the side and days go across the top.

For example, here is a tiny 3×33 \times 3 picture. Each number tells how bright a pixel is, from 0 (black) to 255 (white):

[06012060120200120200255]\begin{bmatrix} 0 & 60 & 120 \\ 60 & 120 & 200 \\ 120 & 200 & 255 \end{bmatrix}

A computer stores and changes the whole picture by working with this one table. To make the picture brighter, it changes every number in a single step. This is the power of a matrix: we can work with a whole table at once.

Matrices are used to:

  • store and combine large tables of data (sales, scores, measurements);
  • move, turn and resize shapes in computer graphics and games;
  • solve many equations at the same time;
  • send secret messages in cryptography;
  • describe how a system changes from one step to the next, in science and economics.
In this chapter you will learn: what a matrix is and how to describe its size; the special types of matrices; how to add, subtract and multiply matrices; and how to flip a matrix (transpose) and undo one (inverse).

Think about it: which table of numbers do you use most often in daily life? How many rows and columns does it have?

3.2 Matrix

415 words · 2 min read

Three students, A, B and C, take two tests. Their marks are shown in this table:

StudentTest 1Test 2
A7265
B5881
C9077

If we agree that rows are students (in the order A, B, C) and columns are tests (in the order 1, 2), we do not need the labels. We can keep only the numbers and put them inside brackets:

M=[726558819077]M = \begin{bmatrix} 72 & 65 \\ 58 & 81 \\ 90 & 77 \end{bmatrix}

This arrangement is a matrix.

Definition. A matrix is a rectangular arrangement of numbers (or expressions) in rows and columns, written inside brackets. Each number in it is called an element or entry. We name matrices with capital letters such as AA, BB and MM.

In simple words: a matrix is a table of numbers with the labels removed. The position of each number carries the meaning: in MM, the number 81 is in row 2, column 2, so it is student B's mark in Test 2.

  • A row is a horizontal line of entries. Rows are counted from the top.
  • A column is a vertical line of entries. Columns are counted from the left.

In MM above, row 1 is [72    65][72 \;\; 65] and column 2 is [658177]\begin{bmatrix} 65 \\ 81 \\ 77 \end{bmatrix}.

Common mistake: mixing up rows and columns. Rows go across (like the rows of seats in a cinema). Columns go down (like pillars). When we name a position, we always say the row first and then the column.

A=[2−14037],B=[50−2916],C=[1.5−380]A = \begin{bmatrix} 2 & -1 & 4 \\ 0 & 3 & 7 \end{bmatrix}, \qquad B = \begin{bmatrix} 5 & 0 \\ -2 & 9 \\ 1 & 6 \end{bmatrix}, \qquad C = \begin{bmatrix} 1.5 & -3 & 8 & 0 \end{bmatrix}

AA has 2 rows and 3 columns. BB has 3 rows and 2 columns. CC has 1 row and 4 columns. Entries can be positive, negative, zero, fractions or decimals.

  1. In matrix MM above, which student got the highest mark in Test 1, and what was it?
  2. How many rows and columns does [410729358601]\begin{bmatrix} 4 & 1 & 0 \\ 7 & 2 & 9 \\ 3 & 5 & 8 \\ 6 & 0 & 1 \end{bmatrix} have?
  3. Write the marks of the three students in Test 2 as a column.

Answers

  1. Student C, with 90 (the largest entry in column 1).
  2. 4 rows and 3 columns.
  3. [658177]\begin{bmatrix} 65 \\ 81 \\ 77 \end{bmatrix}

3.2.1 Order of a matrix

638 words · 3 min read

The order of a matrix tells us its size. A matrix with mm rows and nn columns has order m×nm \times n, read "mm by nn". The number of rows always comes first.

For example, [314159]\begin{bmatrix} 3 & 1 & 4 \\ 1 & 5 & 9 \end{bmatrix} has order 2×32 \times 3 and has 2×3=62 \times 3 = 6 entries.

Think of a chocolate bar with 3 rows and 4 columns of squares. It has 3×4=123 \times 4 = 12 pieces. In the same way, a matrix of order m×nm \times n has mnmn entries.

We write aija_{ij} for the entry in row ii and column jj. A matrix of order m×nm \times n can then be written as A=[aij]m×nA = [a_{ij}]_{m \times n}:

A=[a11a12…a1na21a22…a2n⋮⋮⋮am1am2…amn]A = \begin{bmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & & \vdots \\ a_{m1} & a_{m2} & \dots & a_{mn} \end{bmatrix}

Reading the address: in aija_{ij}, the first small number (ii) is the row, and the second (jj) is the column. So a23a_{23} is in row 2, column 3. Entries of the form aiia_{ii} (a11,a22,…a_{11}, a_{22}, \dots) lie along the diagonal that runs from the top-left corner downward to the right.

Example 1. Construct a 3×23 \times 2 matrix A=[aij]A = [a_{ij}] whose entries are given by aij=2i−ja_{ij} = 2i - j.

Solution. A 3×23 \times 2 matrix has entries a11,a12,a21,a22,a31,a32a_{11}, a_{12}, a_{21}, a_{22}, a_{31}, a_{32}. Put in the row number ii and the column number jj each time:

a11=2(1)−1=1,a12=2(1)−2=0,a21=2(2)−1=3,a22=2(2)−2=2,a31=2(3)−1=5,a32=2(3)−2=4.\begin{aligned} a_{11} &= 2(1) - 1 = 1, & a_{12} &= 2(1) - 2 = 0, \\ a_{21} &= 2(2) - 1 = 3, & a_{22} &= 2(2) - 2 = 2, \\ a_{31} &= 2(3) - 1 = 5, & a_{32} &= 2(3) - 2 = 4. \end{aligned}

So A=[103254]A = \begin{bmatrix} 1 & 0 \\ 3 & 2 \\ 5 & 4 \end{bmatrix}.

Example 2. A matrix has 12 entries. What orders can it have?

Solution. We need m×n=12m \times n = 12 with mm and nn natural numbers. The pairs are (1,12)(1, 12), (2,6)(2, 6), (3,4)(3, 4), (4,3)(4, 3), (6,2)(6, 2), (12,1)(12, 1). So the possible orders are 1×121 \times 12, 2×62 \times 6, 3×43 \times 4, 4×34 \times 3, 6×26 \times 2, 12×112 \times 1.

Example 3. A matrix can store the corners of a shape. The corners of a four-sided figure PQRS are P(0,0)P(0, 0), Q(4,1)Q(4, 1), R(5,4)R(5, 4) and S(1,3)S(1, 3). Write them as the columns of a matrix, so that the first row holds the xx-coordinates and the second row holds the yy-coordinates.

Solution. X=[04510143]X = \begin{bmatrix} 0 & 4 & 5 & 1 \\ 0 & 1 & 4 & 3 \end{bmatrix} This matrix has order 2×42 \times 4.

The corners of PQRS are the columns of the matrix X. Hover over a corner to read its coordinates.

Computer graphics programs store every shape this way. To move or turn the shape, they change the numbers in this one matrix.

  1. What is the order of [12345678]\begin{bmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \\ 7 & 8 \end{bmatrix}, and how many entries does it have?
  2. A matrix has 15 entries. List all possible orders.
  3. Write the 2×22 \times 2 matrix with aij=i+ja_{ij} = i + j.
  4. In a matrix of order 4×54 \times 5, how many entries lie in row 3?

Answers

  1. Order 4×24 \times 2; 8 entries.
  2. 1×151 \times 15, 3×53 \times 5, 5×35 \times 3, 15×115 \times 1.
  3. [2334]\begin{bmatrix} 2 & 3 \\ 3 & 4 \end{bmatrix}
  4. 5 entries (one for each column).

3.3 Types of Matrices

158 words · 1 min read

Some matrices have a special shape or a special pattern, and each has its own name. Knowing the names helps us spot shortcuts later.

TypeWhat makes it specialEveryday picture
Column matrixOnly one columnPrices of four items listed one below the other
Row matrixOnly one rowOne player's scores in four rounds, side by side
Square matrixNumber of rows = number of columnsA 3 by 3 tic-tac-toe grid
Diagonal matrixSquare, with 0 everywhere off the diagonalA table where only the diagonal cells are used
Scalar matrixDiagonal matrix with the same number all along the diagonalA diagonal where every cell holds the same value
Identity matrixScalar matrix with 1 on the diagonalThe number 1 of the matrix world
Zero matrixEvery entry is 0An empty score sheet

(i) Column matrix

43 words · 1 min read

A matrix with only one column is a column matrix. Its order is m×1m \times 1.

Example: the prices of four items listed one below the other form the column matrix [2504075190]\begin{bmatrix} 250 \\ 40 \\ 75 \\ 190 \end{bmatrix}, of order 4×14 \times 1.

(ii) Row matrix

48 words · 1 min read

A matrix with only one row is a row matrix. Its order is 1×n1 \times n.

Example: one player's scores in five rounds, written side by side, form the row matrix [60947]\begin{bmatrix} 6 & 0 & 9 & 4 & 7 \end{bmatrix}, of order 1×51 \times 5.

(iii) Square matrix

120 words · 1 min read

A matrix with the same number of rows and columns is a square matrix. If it has nn rows and nn columns, we say it is a square matrix of order nn.

Example: S=[4−2705138−6]S = \begin{bmatrix} 4 & -2 & 7 \\ 0 & 5 & 1 \\ 3 & 8 & -6 \end{bmatrix} is a square matrix of order 3. A tic-tac-toe board and a sudoku grid are square.

The entries a11,a22,…,anna_{11}, a_{22}, \dots, a_{nn} of a square matrix form its diagonal. In SS the diagonal entries are 4, 5 and −6.

Remember: only square matrices have a diagonal. A 2×32 \times 3 matrix is not square, so we do not talk about its diagonal.

(iv) Diagonal matrix

74 words · 1 min read

A square matrix in which every entry off the diagonal is 0 is a diagonal matrix. In symbols, aij=0a_{ij} = 0 whenever i≠ji \neq j.

Example: D=[3000−10006]D = \begin{bmatrix} 3 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 6 \end{bmatrix} is a diagonal matrix of order 3.

In simple words: the diagonal entries may be any numbers, even 0. Only the entries off the diagonal must be 0.

(v) Scalar matrix

57 words · 1 min read

A diagonal matrix whose diagonal entries are all equal is a scalar matrix. So aij=0a_{ij} = 0 for i≠ji \neq j and aii=ka_{ii} = k for one fixed number kk.

Example: [700070007]\begin{bmatrix} 7 & 0 & 0 \\ 0 & 7 & 0 \\ 0 & 0 & 7 \end{bmatrix} is a scalar matrix with k=7k = 7.

(vi) Identity matrix

124 words · 1 min read

A scalar matrix with k=1k = 1, that is, with 1 on the diagonal and 0 elsewhere, is an identity matrix. We write InI_n for the identity matrix of order nn, or simply II when the order is clear.

I2=[1001],I3=[100010001]I_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, \qquad I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}

Why it matters: multiplying an ordinary number by 1 leaves it unchanged. Multiplying a matrix by an identity matrix of the right size leaves it unchanged too. You will see this in 3.4.6.

Every identity matrix is a scalar matrix, but a scalar matrix is an identity matrix only when k=1k = 1.

(vii) Zero matrix

195 words · 1 min read

A matrix whose entries are all 0 is a zero matrix (or null matrix). We write OO for it; its order is understood from the situation.

O2×2=[0000],O1×3=[000]O_{2 \times 2} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}, \qquad O_{1 \times 3} = \begin{bmatrix} 0 & 0 & 0 \end{bmatrix}

Why it matters: adding 0 to an ordinary number leaves it unchanged. Adding the zero matrix to a matrix of the same order leaves it unchanged too.

  1. Name the type of each matrix: (a) [0000]\begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} (b) [52]\begin{bmatrix} 5 \\ 2 \end{bmatrix} (c) [2002]\begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} (d) [1001]\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} (e) [3104]\begin{bmatrix} 3 & 1 \\ 0 & 4 \end{bmatrix}.
  2. Is every diagonal matrix a square matrix? Is every square matrix a diagonal matrix?

Answers

  1. (a) zero matrix (b) column matrix (c) scalar matrix (and diagonal, square) (d) identity matrix (and scalar, diagonal, square) (e) square matrix only (it has a non-zero entry off the diagonal).
  2. Yes, every diagonal matrix is square by definition. No, a square matrix such as the one in (e) is not diagonal.

3.3.1 Equality of matrices

418 words · 2 min read

Two matrices AA and BB are equal (we write A=BA = B) when both of these are true:

  1. they have the same order, and
  2. every entry of AA equals the entry of BB in the same position, that is, aij=bija_{ij} = b_{ij} for all ii and jj.
In simple words: two matrices are equal only if they have the same size and every number matches its partner in the same position. The same numbers in a different order do not make equal matrices. It is like comparing two score tables cell by cell.

For example, [1234]=[1234]\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, but [1234]≠[2134]\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \neq \begin{bmatrix} 2 & 1 \\ 3 & 4 \end{bmatrix}, because the entries in row 1 are swapped. Also, [1    2]≠[12][1 \;\; 2] \neq \begin{bmatrix} 1 \\ 2 \end{bmatrix} because their orders differ.

  1. Pair up the entries that sit in the same position.
  2. Write one small equation for each pair.
  3. Solve each equation.

Example 1. Find xx and yy if [x+253y−1]=[7534]\begin{bmatrix} x + 2 & 5 \\ 3 & y - 1 \end{bmatrix} = \begin{bmatrix} 7 & 5 \\ 3 & 4 \end{bmatrix}.

Solution. Compare the entries in the same positions. Row 1, column 1 gives x+2=7x + 2 = 7, so x=5x = 5. Row 2, column 2 gives y−1=4y - 1 = 4, so y=5y = 5. The other two pairs (5=55 = 5 and 3=33 = 3) already match. Hence x=5x = 5 and y=5y = 5.

Example 2. Find xx, yy and zz if [2x+y4zx−y]=[74−1−1]\begin{bmatrix} 2x + y & 4 \\ z & x - y \end{bmatrix} = \begin{bmatrix} 7 & 4 \\ -1 & -1 \end{bmatrix}.

Solution. Comparing entries gives three equations: 2x+y=72x + y = 7, z=−1z = -1 and x−y=−1x - y = -1. Adding the first and third equations gives 3x=63x = 6, so x=2x = 2. Then y=x+1=3y = x + 1 = 3. Check: 2(2)+3=72(2) + 3 = 7 and 2−3=−12 - 3 = -1. Hence x=2x = 2, y=3y = 3, z=−1z = -1.

  1. Are [1001]\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} and [100010]\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix} equal? Why or why not?
  2. Find aa and bb if [a+b30a−b]=[8302]\begin{bmatrix} a + b & 3 \\ 0 & a - b \end{bmatrix} = \begin{bmatrix} 8 & 3 \\ 0 & 2 \end{bmatrix}.

Answers

  1. No. The orders are different (2×22 \times 2 and 2×32 \times 3).
  2. a+b=8a + b = 8 and a−b=2a - b = 2; adding gives 2a=102a = 10, so a=5a = 5 and b=3b = 3.

EXERCISE 3.1

262 words · 1 min read
  1. For A=[3−28105−49726−1]A = \begin{bmatrix} 3 & -2 & 8 & 1 \\ 0 & 5 & -4 & 9 \\ 7 & 2 & 6 & -1 \end{bmatrix} write: (a) the order of AA, (b) the number of entries, (c) the entries a13a_{13}, a22a_{22} and a34a_{34}.
  2. List all possible orders of a matrix with (a) 18 entries (b) 7 entries.
  3. Construct the 2×32 \times 3 matrix with aij=ij+1a_{ij} = ij + 1.
  4. Construct the 3×23 \times 2 matrix with aij=(i−j)2a_{ij} = (i - j)^2.
  5. Find xx and yy if [x+y24x−y]=[9243]\begin{bmatrix} x + y & 2 \\ 4 & x - y \end{bmatrix} = \begin{bmatrix} 9 & 2 \\ 4 & 3 \end{bmatrix}.
  6. Find pp, qq and rr if [pq+12r5]=[48105]\begin{bmatrix} p & q + 1 \\ 2r & 5 \end{bmatrix} = \begin{bmatrix} 4 & 8 \\ 10 & 5 \end{bmatrix}.
  7. Choose the correct answer. A matrix [aij]m×n[a_{ij}]_{m \times n} is a square matrix if (A) m<nm < n (B) m>nm > n (C) m=nm = n (D) none of these.
  8. How many different 2×22 \times 2 matrices can be made if every entry must be 0 or 1?

Answers

  1. (a) 3×43 \times 4; (b) 12; (c) a13=8a_{13} = 8, a22=5a_{22} = 5, a34=−1a_{34} = -1.
  2. (a) 1×181 \times 18, 2×92 \times 9, 3×63 \times 6, 6×36 \times 3, 9×29 \times 2, 18×118 \times 1; (b) 1×71 \times 7, 7×17 \times 1.
  3. [234357]\begin{bmatrix} 2 & 3 & 4 \\ 3 & 5 & 7 \end{bmatrix}
  4. [011041]\begin{bmatrix} 0 & 1 \\ 1 & 0 \\ 4 & 1 \end{bmatrix}
  5. x=6x = 6, y=3y = 3.
  6. p=4p = 4, q=7q = 7, r=5r = 5.
  7. (C).
  8. 24=162^4 = 16 matrices (each of the 4 entries has 2 choices).

3.4 Operations on Matrices

92 words · 1 min read

Just as we add, subtract and multiply numbers, we can combine matrices. In this section we learn four operations:

  • Addition of matrices
  • Multiplication of a matrix by a scalar (a scalar is an ordinary number)
  • Subtraction of matrices
  • Multiplication of two matrices
Real-life view: adding matrices is like merging two sales reports. Multiplying by a number is like doubling a recipe. Subtracting is like comparing this week with last week. Multiplying two matrices is like turning a list of quantities and a list of prices into a bill.

3.4.1 Addition of matrices

449 words · 2 min read

A warehouse supplies laptops, tablets and phones to two shops, Shop 1 and Shop 2. The tables show the number of devices delivered in Week 1 and in Week 2 (rows: shops; columns: laptops, tablets, phones):

Week 1: W1=[12857149],Week 2: W2=[61039411]\text{Week 1: } W_1 = \begin{bmatrix} 12 & 8 & 5 \\ 7 & 14 & 9 \end{bmatrix}, \qquad \text{Week 2: } W_2 = \begin{bmatrix} 6 & 10 & 3 \\ 9 & 4 & 11 \end{bmatrix}

To find the total delivered over the two weeks, we add the numbers that are in the same position:

W1+W2=[12+68+105+37+914+49+11]=[18188161820]W_1 + W_2 = \begin{bmatrix} 12 + 6 & 8 + 10 & 5 + 3 \\ 7 + 9 & 14 + 4 & 9 + 11 \end{bmatrix} = \begin{bmatrix} 18 & 18 & 8 \\ 16 & 18 & 20 \end{bmatrix}

So Shop 1 received 18, 18, 8 laptops, tablets and phones in total, and Shop 2 received 16, 18, 20.

Rule: to add two matrices, add the entries in the same position. This is possible only when both matrices have the same order. If A=[aij]A = [a_{ij}] and B=[bij]B = [b_{ij}] both have order m×nm \times n, then A+B=[aij+bij]A + B = [a_{ij} + b_{ij}], which also has order m×nm \times n.

Matrices of different orders cannot be added. A 2×32 \times 3 table and a 3×23 \times 2 table do not line up cell by cell, so their sum is not defined.

Example 1. Find A+BA + B if A=[2−3504−1]A = \begin{bmatrix} 2 & -3 & 5 \\ 0 & 4 & -1 \end{bmatrix} and B=[71−2−638]B = \begin{bmatrix} 7 & 1 & -2 \\ -6 & 3 & 8 \end{bmatrix}.

Solution. Both matrices have order 2×32 \times 3, so A+BA + B is defined: A+B=[2+7−3+15+(−2)0+(−6)4+3−1+8]=[9−23−677]A + B = \begin{bmatrix} 2 + 7 & -3 + 1 & 5 + (-2) \\ 0 + (-6) & 4 + 3 & -1 + 8 \end{bmatrix} = \begin{bmatrix} 9 & -2 & 3 \\ -6 & 7 & 7 \end{bmatrix}

Example 2. Can [1234]\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} and [123456]\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} be added?

Solution. No. The first has order 2×22 \times 2 and the second has order 2×32 \times 3. The orders are different, so the sum is not defined.

  1. Find [40−27]+[152−3]\begin{bmatrix} 4 & 0 \\ -2 & 7 \end{bmatrix} + \begin{bmatrix} 1 & 5 \\ 2 & -3 \end{bmatrix}.
  2. Find [1.520−1]+[0.5−241]\begin{bmatrix} 1.5 & 2 \\ 0 & -1 \end{bmatrix} + \begin{bmatrix} 0.5 & -2 \\ 4 & 1 \end{bmatrix}.
  3. A 3×43 \times 4 matrix is added to a 4×34 \times 3 matrix. Is the sum defined?

Answers

  1. [5504]\begin{bmatrix} 5 & 5 \\ 0 & 4 \end{bmatrix}
  2. [2040]\begin{bmatrix} 2 & 0 \\ 4 & 0 \end{bmatrix}
  3. No, the orders differ.

3.4.2 Multiplication of a matrix by a scalar

399 words · 2 min read

A scalar is an ordinary number. Suppose a recipe table RR lists the amount of each of three ingredients needed for two dishes when cooking for 2 people. To cook for 6 people we need 3 times as much of everything:

R=[214302],3R=[3⋅23⋅13⋅43⋅33⋅03⋅2]=[6312906]R = \begin{bmatrix} 2 & 1 & 4 \\ 3 & 0 & 2 \end{bmatrix}, \qquad 3R = \begin{bmatrix} 3 \cdot 2 & 3 \cdot 1 & 3 \cdot 4 \\ 3 \cdot 3 & 3 \cdot 0 & 3 \cdot 2 \end{bmatrix} = \begin{bmatrix} 6 & 3 & 12 \\ 9 & 0 & 6 \end{bmatrix}

Rule: to multiply a matrix by a scalar kk, multiply every entry by kk. If A=[aij]A = [a_{ij}], then kA=[k aij]kA = [k\,a_{ij}]. The order of the matrix does not change.

We define −A=(−1)A-A = (-1)A. It is AA with the sign of every entry changed.

A=[5−204−31],−A=[−520−43−1]A = \begin{bmatrix} 5 & -2 \\ 0 & 4 \\ -3 & 1 \end{bmatrix}, \qquad -A = \begin{bmatrix} -5 & 2 \\ 0 & -4 \\ 3 & -1 \end{bmatrix}

For two matrices of the same order, A−BA - B means subtract entry by entry. This is the same as A+(−B)A + (-B).

A−B=[5−1−2−30−(−4)4−2−3−61−(−5)]=[4−542−96]A - B = \begin{bmatrix} 5 - 1 & -2 - 3 \\ 0 - (-4) & 4 - 2 \\ -3 - 6 & 1 - (-5) \end{bmatrix} = \begin{bmatrix} 4 & -5 \\ 4 & 2 \\ -9 & 6 \end{bmatrix}

where B=[13−426−5]B = \begin{bmatrix} 1 & 3 \\ -4 & 2 \\ 6 & -5 \end{bmatrix}. Real-life use: this week's sales minus last week's sales shows how each number has changed.

Example. With AA and BB as above, find 2A−B2A - B.

Solution. First multiply, then subtract: 2A=[10−408−62],2A−B=[10−1−4−30−(−4)8−2−6−62−(−5)]=[9−746−127]2A = \begin{bmatrix} 10 & -4 \\ 0 & 8 \\ -6 & 2 \end{bmatrix}, \qquad 2A - B = \begin{bmatrix} 10 - 1 & -4 - 3 \\ 0 - (-4) & 8 - 2 \\ -6 - 6 & 2 - (-5) \end{bmatrix} = \begin{bmatrix} 9 & -7 \\ 4 & 6 \\ -12 & 7 \end{bmatrix}

  1. Find 4[1−203]4\begin{bmatrix} 1 & -2 \\ 0 & 3 \end{bmatrix}.
  2. If P=[2468]P = \begin{bmatrix} 2 & 4 \\ 6 & 8 \end{bmatrix}, find 12P\frac{1}{2}P.
  3. Find [9521]−[45−13]\begin{bmatrix} 9 & 5 \\ 2 & 1 \end{bmatrix} - \begin{bmatrix} 4 & 5 \\ -1 & 3 \end{bmatrix}.

Answers

  1. [4−8012]\begin{bmatrix} 4 & -8 \\ 0 & 12 \end{bmatrix}
  2. [1234]\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}
  3. [503−2]\begin{bmatrix} 5 & 0 \\ 3 & -2 \end{bmatrix}

3.4.3 Properties of matrix addition

308 words · 1 min read

Matrix addition obeys the same friendly rules as addition of numbers. Take AA, BB and CC of the same order.

  • Commutative law: A+B=B+AA + B = B + A. The order does not matter.
  • Associative law: (A+B)+C=A+(B+C)(A + B) + C = A + (B + C). The grouping does not matter.
  • Additive identity: A+O=O+A=AA + O = O + A = A, where OO is the zero matrix of the same order.
  • Additive inverse: A+(−A)=(−A)+A=OA + (-A) = (-A) + A = O.

Let A=[2−130]A = \begin{bmatrix} 2 & -1 \\ 3 & 0 \end{bmatrix}, B=[45−21]B = \begin{bmatrix} 4 & 5 \\ -2 & 1 \end{bmatrix} and C=[067−3]C = \begin{bmatrix} 0 & 6 \\ 7 & -3 \end{bmatrix}.

A+B=[6411],B+A=[6411]A + B = \begin{bmatrix} 6 & 4 \\ 1 & 1 \end{bmatrix}, \qquad B + A = \begin{bmatrix} 6 & 4 \\ 1 & 1 \end{bmatrix}

They are equal, as the commutative law says. For the associative law: (A+B)+C=[6108−2],A+(B+C)=[6108−2](A + B) + C = \begin{bmatrix} 6 & 10 \\ 8 & -2 \end{bmatrix}, \qquad A + (B + C) = \begin{bmatrix} 6 & 10 \\ 8 & -2 \end{bmatrix}

Also A+O=[2−130]=AA + O = \begin{bmatrix} 2 & -1 \\ 3 & 0 \end{bmatrix} = A and A+(−A)=[0000]=OA + (-A) = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} = O.

Matrices are added entry by entry, so each rule for matrices comes from the same rule for the numbers inside them. For example, the entry in row ii, column jj of A+BA + B is aij+bija_{ij} + b_{ij}. For B+AB + A it is bij+aijb_{ij} + a_{ij}. These are equal because adding numbers can be done in either order. Since this is true for every position, A+B=B+AA + B = B + A.

Remember: a number check is an example, not a proof. The entry-by-entry argument above works for every matrix, which is why it proves the law.

3.4.4 Properties of scalar multiplication of a matrix

594 words · 3 min read

Let AA and BB be matrices of the same order and let kk and ll be scalars. Then:

  • k(A+B)=kA+kBk(A + B) = kA + kB
  • (k+l)A=kA+lA(k + l)A = kA + lA
In simple words: it does not matter whether you add two tables first and then multiply by a number, or multiply each table first and then add. Tripling the total of two shopping lists gives the same result as tripling each list and adding.

Check. Let A=[14−23]A = \begin{bmatrix} 1 & 4 \\ -2 & 3 \end{bmatrix}, B=[502−1]B = \begin{bmatrix} 5 & 0 \\ 2 & -1 \end{bmatrix}, k=3k = 3 and l=2l = 2. k(A+B)=[181206],kA+kB=[181206]k(A + B) = \begin{bmatrix} 18 & 12 \\ 0 & 6 \end{bmatrix}, \qquad kA + kB = \begin{bmatrix} 18 & 12 \\ 0 & 6 \end{bmatrix} (k+l)A=[520−1015],kA+lA=[520−1015](k + l)A = \begin{bmatrix} 5 & 20 \\ -10 & 15 \end{bmatrix}, \qquad kA + lA = \begin{bmatrix} 5 & 20 \\ -10 & 15 \end{bmatrix} Each pair matches.

Matrix equations are solved just like ordinary equations. We may add or subtract the same matrix on both sides, and multiply both sides by the same number.

Example 1. Find the matrix XX if 2A+3X=B2A + 3X = B, where A=[2103]A = \begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix} and B=[16−1621]B = \begin{bmatrix} 16 & -1 \\ 6 & 21 \end{bmatrix}.

Solution. Subtract 2A2A from both sides: 3X=B−2A3X = B - 2A. Then multiply both sides by 13\frac{1}{3}: X=13(B−2A)X = \frac{1}{3}(B - 2A). Now 2A=[4206]2A = \begin{bmatrix} 4 & 2 \\ 0 & 6 \end{bmatrix}, so B−2A=[12−3615]B - 2A = \begin{bmatrix} 12 & -3 \\ 6 & 15 \end{bmatrix} and X=13[12−3615]=[4−125]X = \frac{1}{3}\begin{bmatrix} 12 & -3 \\ 6 & 15 \end{bmatrix} = \begin{bmatrix} 4 & -1 \\ 2 & 5 \end{bmatrix}

Example 2. Find XX and YY if X+Y=[8644]X + Y = \begin{bmatrix} 8 & 6 \\ 4 & 4 \end{bmatrix} and X−Y=[4−2−62]X - Y = \begin{bmatrix} 4 & -2 \\ -6 & 2 \end{bmatrix}.

Solution. Adding the two equations cancels YY: 2X=[124−26]2X = \begin{bmatrix} 12 & 4 \\ -2 & 6 \end{bmatrix}, so X=[62−13]X = \begin{bmatrix} 6 & 2 \\ -1 & 3 \end{bmatrix}. Subtracting the second equation from the first cancels XX: 2Y=[48102]2Y = \begin{bmatrix} 4 & 8 \\ 10 & 2 \end{bmatrix}, so Y=[2451]Y = \begin{bmatrix} 2 & 4 \\ 5 & 1 \end{bmatrix}.

Example 3. Two stores sell three products. Their sales (in the same currency) in March and April are MM and NN (rows: stores; columns: products): M=[12008005009001100700],N=[150060080010001300400]M = \begin{bmatrix} 1200 & 800 & 500 \\ 900 & 1100 & 700 \end{bmatrix}, \qquad N = \begin{bmatrix} 1500 & 600 & 800 \\ 1000 & 1300 & 400 \end{bmatrix} (a) Find the total sales for the two months. (b) Find the change from March to April. (c) The stores expect sales in the next period to be three times March's sales. Find that matrix.

Solution. (a) M+N=[270014001300190024001100]M + N = \begin{bmatrix} 2700 & 1400 & 1300 \\ 1900 & 2400 & 1100 \end{bmatrix}. (b) N−M=[300−200300100200−300]N - M = \begin{bmatrix} 300 & -200 & 300 \\ 100 & 200 & -300 \end{bmatrix}; a negative entry means sales fell. (c) 3M=[360024001500270033002100]3M = \begin{bmatrix} 3600 & 2400 & 1500 \\ 2700 & 3300 & 2100 \end{bmatrix}.

  1. If A=[1234]A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, find 2A+3A2A + 3A and 5A5A. What do you notice?
  2. Find XX if X+[1122]=[5439]X + \begin{bmatrix} 1 & 1 \\ 2 & 2 \end{bmatrix} = \begin{bmatrix} 5 & 4 \\ 3 & 9 \end{bmatrix}.

Answers

  1. 2A+3A=[5101520]2A + 3A = \begin{bmatrix} 5 & 10 \\ 15 & 20 \end{bmatrix} and 5A=[5101520]5A = \begin{bmatrix} 5 & 10 \\ 15 & 20 \end{bmatrix}. They are equal, as (k+l)A=kA+lA(k + l)A = kA + lA says.
  2. X=[4317]X = \begin{bmatrix} 4 & 3 \\ 1 & 7 \end{bmatrix}

3.4.5 Multiplication of matrices

1,145 words · 5 min read

Multiplying matrices is different from adding them. We do not multiply cell by cell. Instead, we combine a row of the first matrix with a column of the second. The easiest way to see why is to look at a bill.

A café sells coffee for 4, tea for 3 and juice for 5 (in the same currency). A customer orders 2 coffees, 1 tea and 3 juices. The bill is

2×4+1×3+3×5=262 \times 4 + 1 \times 3 + 3 \times 5 = 26

We can write the order as a row and the prices as a column. Multiplying the pairs and adding gives one number:

[213][435]=[26]\begin{bmatrix} 2 & 1 & 3 \end{bmatrix} \begin{bmatrix} 4 \\ 3 \\ 5 \end{bmatrix} = \begin{bmatrix} 26 \end{bmatrix}

A second customer orders 1 coffee, 4 teas and no juice. Their bill is 1⋅4+4⋅3+0⋅5=161 \cdot 4 + 4 \cdot 3 + 0 \cdot 5 = 16. If we write each order as a row of one matrix AA (3 items), and keep the prices in a column, one multiplication gives both bills:

[213140]⏟2×3[435]⏟3×1=[2616]⏟2×1\underbrace{\begin{bmatrix} 2 & 1 & 3 \\ 1 & 4 & 0 \end{bmatrix}}_{2 \times 3} \underbrace{\begin{bmatrix} 4 \\ 3 \\ 5 \end{bmatrix}}_{3 \times 1} = \underbrace{\begin{bmatrix} 26 \\ 16 \end{bmatrix}}_{2 \times 1}

A second café charges 5 for coffee, 2 for tea and 4 for juice. Put the prices of the two cafés side by side as two columns of a matrix BB. One multiplication now gives every bill at every café:

AB=[213140][453254]=[26241613]AB = \begin{bmatrix} 2 & 1 & 3 \\ 1 & 4 & 0 \end{bmatrix} \begin{bmatrix} 4 & 5 \\ 3 & 2 \\ 5 & 4 \end{bmatrix} = \begin{bmatrix} 26 & 24 \\ 16 & 13 \end{bmatrix}

Read the result like a table: row = which order, column = which café. For example, the entry 24 in row 1, column 2 is the bill for order 1 at the second café, 2⋅5+1⋅2+3⋅4=242 \cdot 5 + 1 \cdot 2 + 3 \cdot 4 = 24.

The big idea: each entry of the answer comes from one row of the first matrix and one column of the second matrix. Multiply the pairs in order, then add.

Let AA be an m×nm \times n matrix and let BB be an n×pn \times p matrix. Then the product ABAB is defined, and it is a matrix of order m×pm \times p. Its entry in row ii and column kk is

cik=ai1b1k+ai2b2k+⋯+ainbnk=∑j=1naijbjkc_{ik} = a_{i1}b_{1k} + a_{i2}b_{2k} + \dots + a_{in}b_{nk} = \sum_{j=1}^{n} a_{ij}b_{jk}

Size check before you start: write the orders side by side, (m×n)(n×p)(m \times n)(n \times p). The two middle numbers must be equal, or the product does not exist. The two outer numbers give the order of the answer: m×pm \times p.

Example A. Find ABAB if A=[1203−14]A = \begin{bmatrix} 1 & 2 & 0 \\ 3 & -1 & 4 \end{bmatrix} and B=[2105−32]B = \begin{bmatrix} 2 & 1 \\ 0 & 5 \\ -3 & 2 \end{bmatrix}.

Solution. AA is 2×32 \times 3 and BB is 3×23 \times 2. The middle numbers are both 3, so ABAB is defined and its order is 2×22 \times 2. Each entry is a row of AA times a column of BB:

AB=[1⋅2+2⋅0+0⋅(−3)1⋅1+2⋅5+0⋅23⋅2+(−1)⋅0+4⋅(−3)3⋅1+(−1)⋅5+4⋅2]=[211−66]AB = \begin{bmatrix} 1 \cdot 2 + 2 \cdot 0 + 0 \cdot (-3) & 1 \cdot 1 + 2 \cdot 5 + 0 \cdot 2 \\ 3 \cdot 2 + (-1) \cdot 0 + 4 \cdot (-3) & 3 \cdot 1 + (-1) \cdot 5 + 4 \cdot 2 \end{bmatrix} = \begin{bmatrix} 2 & 11 \\ -6 & 6 \end{bmatrix}

Example B. In each case, say whether the product is defined. If it is, give its order.

First matrixSecond matrixProduct defined?Order of product
3×23 \times 22×42 \times 4Yes (2 = 2)3×43 \times 4
2×32 \times 32×32 \times 3No (3 ≠ 2)—
1×31 \times 3 (a row)3×13 \times 1 (a column)Yes (3 = 3)1×11 \times 1
3×13 \times 1 (a column)1×31 \times 3 (a row)Yes (1 = 1)3×33 \times 3

Notice the last two rows. The same two lists of numbers give a single number in one order and a whole 3×33 \times 3 table in the other order. This is the first sign that order matters in matrix multiplication.

Example C. A fitness app records the minutes a person spends on running, cycling and swimming on three days. Burning rates are 10, 8 and 9 calories per minute. Find the calories burned on each day.

Solution. Let MM be the minutes matrix (3×33 \times 3: days × activities) and RR the burning rates (3×13 \times 1: activities × calories per minute). Then MRMR is 3×13 \times 1, one total for each day:

MR=[300200453020200][1089]=[30⋅10+0⋅8+20⋅90⋅10+45⋅8+30⋅920⋅10+20⋅8+0⋅9]=[480630360]MR = \begin{bmatrix} 30 & 0 & 20 \\ 0 & 45 & 30 \\ 20 & 20 & 0 \end{bmatrix} \begin{bmatrix} 10 \\ 8 \\ 9 \end{bmatrix} = \begin{bmatrix} 30 \cdot 10 + 0 \cdot 8 + 20 \cdot 9 \\ 0 \cdot 10 + 45 \cdot 8 + 30 \cdot 9 \\ 20 \cdot 10 + 20 \cdot 8 + 0 \cdot 9 \end{bmatrix} = \begin{bmatrix} 480 \\ 630 \\ 360 \end{bmatrix}

So the person burns 480, 630 and 360 calories on the three days.

Common mistakes. (1) Multiplying cell by cell, as we do for addition. (2) Forgetting to check the sizes first. (3) Writing the factors in the wrong order, because ABAB and BABA are usually different (see the next section).

  1. For each pair, say whether the product is defined and give its order: (a) 3×23 \times 2 and 2×52 \times 5; (b) 4×34 \times 3 and 4×34 \times 3; (c) 1×41 \times 4 and 4×14 \times 1; (d) 5×15 \times 1 and 1×21 \times 2.
  2. Find ABAB if A=[3102]A = \begin{bmatrix} 3 & 1 \\ 0 & 2 \end{bmatrix} and B=[145−2]B = \begin{bmatrix} 1 & 4 \\ 5 & -2 \end{bmatrix}.
  3. Find CDCD if C=[2−10134]C = \begin{bmatrix} 2 & -1 & 0 \\ 1 & 3 & 4 \end{bmatrix} and D=[120−351]D = \begin{bmatrix} 1 & 2 \\ 0 & -3 \\ 5 & 1 \end{bmatrix}. What is the order of DCDC?
  4. A school canteen sells sandwiches, salads and soups. The quantities sold on two days are given by Q=[12859107]Q = \begin{bmatrix} 12 & 8 & 5 \\ 9 & 10 & 7 \end{bmatrix} (rows: days; columns: sandwiches, salads, soups). The prices are 3, 4 and 2. Let P=[342]P = \begin{bmatrix} 3 \\ 4 \\ 2 \end{bmatrix} be the price column. Use matrix multiplication to find the income on each day.
  5. Let A=[1234]A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} and B=[0110]B = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}. Find ABAB and BABA. Are they equal?

Answers

  1. (a) defined, 3×53 \times 5; (b) not defined; (c) defined, 1×11 \times 1; (d) defined, 5×25 \times 2.
  2. AB=[81010−4]AB = \begin{bmatrix} 8 & 10 \\ 10 & -4 \end{bmatrix}
  3. CD=[2721−3]CD = \begin{bmatrix} 2 & 7 \\ 21 & -3 \end{bmatrix}; DCDC has order 3×33 \times 3.
  4. QP=[7881]QP = \begin{bmatrix} 78 \\ 81 \end{bmatrix}, so the income is 78 on day 1 and 81 on day 2.
  5. AB=[2143]AB = \begin{bmatrix} 2 & 1 \\ 4 & 3 \end{bmatrix} and BA=[3412]BA = \begin{bmatrix} 3 & 4 \\ 1 & 2 \end{bmatrix}. They are not equal.

Non-commutativity of multiplication of matrices

419 words · 2 min read

With numbers, 3×5=5×33 \times 5 = 5 \times 3. With matrices, ABAB and BABA are usually different, even when both can be calculated.

Think of it like this: putting on socks and then shoes is not the same as putting on shoes and then socks. Order matters. In matrix multiplication the order of the factors matters in the same way.

Example 1 (the orders differ). Let A=[20113−1]A = \begin{bmatrix} 2 & 0 & 1 \\ 1 & 3 & -1 \end{bmatrix} and B=[14025−3]B = \begin{bmatrix} 1 & 4 \\ 0 & 2 \\ 5 & -3 \end{bmatrix}. AA is 2×32 \times 3 and BB is 3×23 \times 2, so both ABAB and BABA are defined, but ABAB has order 2×22 \times 2 and BABA has order 3×33 \times 3.

AB=[75−413],BA=[612−326−27−98]AB = \begin{bmatrix} 7 & 5 \\ -4 & 13 \end{bmatrix}, \qquad BA = \begin{bmatrix} 6 & 12 & -3 \\ 2 & 6 & -2 \\ 7 & -9 & 8 \end{bmatrix}

They cannot be equal, because they are different sizes.

Example 2 (same order, still different). Let C=[2103]C = \begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix} and D=[1042]D = \begin{bmatrix} 1 & 0 \\ 4 & 2 \end{bmatrix}. CD=[2⋅1+1⋅42⋅0+1⋅20⋅1+3⋅40⋅0+3⋅2]=[62126],DC=[1⋅2+0⋅01⋅1+0⋅34⋅2+2⋅04⋅1+2⋅3]=[21810]CD = \begin{bmatrix} 2 \cdot 1 + 1 \cdot 4 & 2 \cdot 0 + 1 \cdot 2 \\ 0 \cdot 1 + 3 \cdot 4 & 0 \cdot 0 + 3 \cdot 2 \end{bmatrix} = \begin{bmatrix} 6 & 2 \\ 12 & 6 \end{bmatrix}, \qquad DC = \begin{bmatrix} 1 \cdot 2 + 0 \cdot 0 & 1 \cdot 1 + 0 \cdot 3 \\ 4 \cdot 2 + 2 \cdot 0 & 4 \cdot 1 + 2 \cdot 3 \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 8 & 10 \end{bmatrix} Both are 2×22 \times 2, yet CD≠DCCD \neq DC.

Common mistake: assuming AB=BAAB = BA. Always keep the factors in the order given.

Sometimes AB=BAAB = BA. Two examples:

  • Diagonal matrices of the same order: [2003][5004]=[100012]=[5004][2003]\begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}\begin{bmatrix} 5 & 0 \\ 0 & 4 \end{bmatrix} = \begin{bmatrix} 10 & 0 \\ 0 & 12 \end{bmatrix} = \begin{bmatrix} 5 & 0 \\ 0 & 4 \end{bmatrix}\begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}.
  • Any square matrix and the identity matrix of the same order: CI=IC=CC I = I C = C.

  1. Find ABAB and BABA for A=[1201]A = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} and B=[1031]B = \begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix}.
  2. If AA is 2×32 \times 3 and BB is 3×23 \times 2, what are the orders of ABAB and BABA?

Answers

  1. AB=[7231]AB = \begin{bmatrix} 7 & 2 \\ 3 & 1 \end{bmatrix} and BA=[1237]BA = \begin{bmatrix} 1 & 2 \\ 3 & 7 \end{bmatrix}. They are different.
  2. ABAB is 2×22 \times 2 and BABA is 3×33 \times 3.

Zero matrix as the product of two non zero matrices

138 words · 1 min read

For numbers, if ab=0ab = 0 then a=0a = 0 or b=0b = 0. For matrices this is not true.

Example. Let A=[1224]A = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix} and B=[2−4−12]B = \begin{bmatrix} 2 & -4 \\ -1 & 2 \end{bmatrix}. Neither is the zero matrix, but AB=[1⋅2+2⋅(−1)1⋅(−4)+2⋅22⋅2+4⋅(−1)2⋅(−4)+4⋅2]=[0000]AB = \begin{bmatrix} 1 \cdot 2 + 2 \cdot (-1) & 1 \cdot (-4) + 2 \cdot 2 \\ 2 \cdot 2 + 4 \cdot (-1) & 2 \cdot (-4) + 4 \cdot 2 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}

Interestingly, BA=[−6−1236]BA = \begin{bmatrix} -6 & -12 \\ 3 & 6 \end{bmatrix} is not the zero matrix, which is another example of AB≠BAAB \neq BA.

In simple words: a product of matrices can be the zero matrix even when neither factor is. So from AB=OAB = O we cannot conclude that A=OA = O or B=OB = O.

3.4.6 Properties of multiplication of matrices

468 words · 2 min read

Matrix multiplication follows most of the rules we know, with one big exception: order matters. Whenever the products are defined:

  1. Associative law: (AB)C=A(BC)(AB)C = A(BC). We may regroup, but we may not reorder.
  2. Distributive laws: A(B+C)=AB+ACA(B + C) = AB + AC and (A+B)C=AC+BC(A + B)C = AC + BC.
  3. Multiplicative identity: IA=AI=AIA = AI = A for a square matrix AA and the identity matrix II of the same order.

Let A=[1201]A = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}, B=[2013]B = \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix} and C=[1120]C = \begin{bmatrix} 1 & 1 \\ 2 & 0 \end{bmatrix}. (AB)C=[16471],A(BC)=[16471](AB)C = \begin{bmatrix} 16 & 4 \\ 7 & 1 \end{bmatrix}, \qquad A(BC) = \begin{bmatrix} 16 & 4 \\ 7 & 1 \end{bmatrix} A(B+C)=[9733],AB+AC=[9733]A(B + C) = \begin{bmatrix} 9 & 7 \\ 3 & 3 \end{bmatrix}, \qquad AB + AC = \begin{bmatrix} 9 & 7 \\ 3 & 3 \end{bmatrix} In each case the two sides agree.

For a square matrix MM, we write M2=MMM^2 = MM and M3=MMMM^3 = MMM. For M=[1101]M = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}: M2=[1201],M3=[1301]M^2 = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}, \qquad M^3 = \begin{bmatrix} 1 & 3 \\ 0 & 1 \end{bmatrix} Do you see the pattern? The top-right entry equals the power.

Example. For N=[2101]N = \begin{bmatrix} 2 & 1 \\ 0 & 1 \end{bmatrix}, show that N2−3N+2I=ON^2 - 3N + 2I = O.

Solution. N2=[4301]N^2 = \begin{bmatrix} 4 & 3 \\ 0 & 1 \end{bmatrix}, 3N=[6303]3N = \begin{bmatrix} 6 & 3 \\ 0 & 3 \end{bmatrix} and 2I=[2002]2I = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}. So N2−3N+2I=[−200−2]+[2002]=[0000]N^2 - 3N + 2I = \begin{bmatrix} -2 & 0 \\ 0 & -2 \end{bmatrix} + \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}.

Example. A course has three tests worth 1, 2 and 3 points per mark. Two students scored S=[706080559065]S = \begin{bmatrix} 70 & 60 & 80 \\ 55 & 90 & 65 \end{bmatrix} (rows: students; columns: tests). Find each student's weighted total.

Solution. Put the weights in a column w=[123]w = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}. Then SwSw is 2×12 \times 1: Sw=[70⋅1+60⋅2+80⋅355⋅1+90⋅2+65⋅3]=[430430]Sw = \begin{bmatrix} 70 \cdot 1 + 60 \cdot 2 + 80 \cdot 3 \\ 55 \cdot 1 + 90 \cdot 2 + 65 \cdot 3 \end{bmatrix} = \begin{bmatrix} 430 \\ 430 \end{bmatrix} The weighted totals are 430 and 430.

  1. If A=[2103]A = \begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix}, find A2A^2.
  2. Is (A+B)2=A2+2AB+B2(A + B)^2 = A^2 + 2AB + B^2 always true for matrices? (Hint: expand (A+B)(A+B)(A+B)(A+B) and remember that AB≠BAAB \neq BA in general.)

Answers

  1. A2=[4509]A^2 = \begin{bmatrix} 4 & 5 \\ 0 & 9 \end{bmatrix}
  2. No. (A+B)(A+B)=A2+AB+BA+B2(A + B)(A + B) = A^2 + AB + BA + B^2, and this equals A2+2AB+B2A^2 + 2AB + B^2 only if AB=BAAB = BA.

EXERCISE 3.2

455 words · 2 min read
  1. Let A=[3124]A = \begin{bmatrix} 3 & 1 \\ 2 & 4 \end{bmatrix} and B=[051−2]B = \begin{bmatrix} 0 & 5 \\ 1 & -2 \end{bmatrix}. Find (i) A+BA + B (ii) A−BA - B (iii) 2A+B2A + B (iv) ABAB (v) BABA.
  2. Let x=2x = 2 and y=3y = 3. Find [xy−yx][x−yyx]\begin{bmatrix} x & y \\ -y & x \end{bmatrix}\begin{bmatrix} x & -y \\ y & x \end{bmatrix} and describe the answer.
  3. Find the products (i) [123][456]\begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}\begin{bmatrix} 4 & 5 & 6 \end{bmatrix} (ii) [456][123]\begin{bmatrix} 4 & 5 & 6 \end{bmatrix}\begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}.
  4. Find XX if 3X+A=B3X + A = B, where A=[1102]A = \begin{bmatrix} 1 & 1 \\ 0 & 2 \end{bmatrix} and B=[107314]B = \begin{bmatrix} 10 & 7 \\ 3 & 14 \end{bmatrix}.
  5. For A=[1234]A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} and B=[2015]B = \begin{bmatrix} 2 & 0 \\ 1 & 5 \end{bmatrix}, find (A+B)2(A + B)^2 and A2+2AB+B2A^2 + 2AB + B^2. Are they equal? Why not?
  6. Find xx and yy if x[12]+y[3−1]=[111]x\begin{bmatrix} 1 \\ 2 \end{bmatrix} + y\begin{bmatrix} 3 \\ -1 \end{bmatrix} = \begin{bmatrix} 11 \\ 1 \end{bmatrix}.
  7. A canteen sold sandwiches, salads and soups on two days: Q=[1510612149]Q = \begin{bmatrix} 15 & 10 & 6 \\ 12 & 14 & 9 \end{bmatrix} (rows: days). The prices are 2, 3 and 1. Use matrix multiplication to find the income on each day. Which day earned more?
  8. Let J=[01−10]J = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}. Find J2J^2 and J4J^4.
  9. Choose the correct answer. If XX has order 2×32 \times 3 and YY has order 3×43 \times 4, then (A) only XYXY is defined (B) only YXYX is defined (C) both are defined (D) neither is defined.

Answers

  1. (i) [3632]\begin{bmatrix} 3 & 6 \\ 3 & 2 \end{bmatrix} (ii) [3−416]\begin{bmatrix} 3 & -4 \\ 1 & 6 \end{bmatrix} (iii) [6756]\begin{bmatrix} 6 & 7 \\ 5 & 6 \end{bmatrix} (iv) [11342]\begin{bmatrix} 1 & 13 \\ 4 & 2 \end{bmatrix} (v) [1020−1−7]\begin{bmatrix} 10 & 20 \\ -1 & -7 \end{bmatrix}
  2. [130013]\begin{bmatrix} 13 & 0 \\ 0 & 13 \end{bmatrix}. It is a scalar matrix: x2+y2=13x^2 + y^2 = 13 times II.
  3. (i) [45681012121518]\begin{bmatrix} 4 & 5 & 6 \\ 8 & 10 & 12 \\ 12 & 15 & 18 \end{bmatrix} (a 3×33 \times 3 matrix) (ii) [32]\begin{bmatrix} 32 \end{bmatrix} (a 1×11 \times 1 matrix).
  4. X=[3214]X = \begin{bmatrix} 3 & 2 \\ 1 & 4 \end{bmatrix}
  5. (A+B)2=[17244889](A+B)^2 = \begin{bmatrix} 17 & 24 \\ 48 & 89 \end{bmatrix} and A2+2AB+B2=[19304287]A^2 + 2AB + B^2 = \begin{bmatrix} 19 & 30 \\ 42 & 87 \end{bmatrix}. They are not equal, because AB≠BAAB \neq BA.
  6. x=2x = 2, y=3y = 3.
  7. Incomes: 66 and 75. Day 2 earned more.
  8. J2=[−100−1]J^2 = \begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix} and J4=[1001]=IJ^4 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = I.
  9. (A) only XYXY is defined.

3.5. Transpose of a Matrix

219 words · 1 min read

The transpose of a matrix is the matrix you get by turning its rows into columns. We write the transpose of AA as A′A' or ATA^T.

If A=[314270]A = \begin{bmatrix} 3 & 1 & 4 \\ 2 & 7 & 0 \end{bmatrix} (order 2×32 \times 3), then the first row of AA becomes the first column of A′A', and the second row becomes the second column: A′=[321740]A' = \begin{bmatrix} 3 & 2 \\ 1 & 7 \\ 4 & 0 \end{bmatrix} which has order 3×23 \times 2.

In simple words: if AA has order m×nm \times n, then A′A' has order n×mn \times m, and the entry in row ii, column jj of AA moves to row jj, column ii of A′A'. Picture a spreadsheet with students down the side and subjects across the top. Its transpose has subjects down the side and students across the top. The data is the same; only the layout is turned.

The transpose of a row matrix is a column matrix, and vice versa: [4    9    1]′=[491][4 \;\; 9 \;\; 1]' = \begin{bmatrix} 4 \\ 9 \\ 1 \end{bmatrix}.

  1. Find the transpose of [50−1238]\begin{bmatrix} 5 & 0 \\ -1 & 2 \\ 3 & 8 \end{bmatrix}.
  2. What is the order of the transpose of a 4×74 \times 7 matrix?

Answers

  1. [5−13028]\begin{bmatrix} 5 & -1 & 3 \\ 0 & 2 & 8 \end{bmatrix}
  2. 7×47 \times 4.

3.5.1 Properties of transpose of the matrices

228 words · 1 min read

For matrices AA and BB of suitable orders and a scalar kk:

  1. (A′)′=A(A')' = A: flipping a table twice brings you back.
  2. (kA)′=kA′(kA)' = kA': multiplying by a number before or after flipping gives the same matrix.
  3. (A+B)′=A′+B′(A + B)' = A' + B': the flip of a sum is the sum of the flips.
  4. (AB)′=B′A′(AB)' = B'A': the flip of a product is the product of the flips in reverse order.

Let A=[123456]A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} and B=[20113−1]B = \begin{bmatrix} 2 & 0 & 1 \\ 1 & 3 & -1 \end{bmatrix}. Then (A+B)′=[352845]=A′+B′(A + B)' = \begin{bmatrix} 3 & 5 \\ 2 & 8 \\ 4 & 5 \end{bmatrix} = A' + B'.

For the product rule, let C=[102103]C = \begin{bmatrix} 1 & 0 \\ 2 & 1 \\ 0 & 3 \end{bmatrix}. Then AC=[5111423]AC = \begin{bmatrix} 5 & 11 \\ 14 & 23 \end{bmatrix}, so (AC)′=[5141123](AC)' = \begin{bmatrix} 5 & 14 \\ 11 & 23 \end{bmatrix}. Also C′A′=[5141123]C'A' = \begin{bmatrix} 5 & 14 \\ 11 & 23 \end{bmatrix}. They match.

Why the order must reverse: A′C′A'C' would be a product of a 3×23 \times 2 and a 2×32 \times 3 matrix, which has order 3×33 \times 3. But (AC)′(AC)' has order 2×22 \times 2. The orders differ, so A′C′A'C' cannot be the answer. Only C′A′C'A' fits.
Common mistake: writing (AB)′=A′B′(AB)' = A'B'. The order of the factors must be reversed.

3.6 Symmetric and Skew Symmetric Matrices

475 words · 2 min read

A square matrix AA is symmetric if A′=AA' = A, that is, aji=aija_{ji} = a_{ij} for all ii and jj.

Real-life picture. A table of distances between three towns is symmetric, because the distance from town 1 to town 2 equals the distance from town 2 to town 1. D=[01271209790]=D′D = \begin{bmatrix} 0 & 12 & 7 \\ 12 & 0 & 9 \\ 7 & 9 & 0 \end{bmatrix} = D'

A square matrix AA is skew symmetric if A′=−AA' = -A, that is, aji=−aija_{ji} = -a_{ij} for all ii and jj. Putting i=ji = j gives aii=−aiia_{ii} = -a_{ii}, so aii=0a_{ii} = 0: all diagonal entries of a skew symmetric matrix are 0.

Real-life picture. A table of points differences between three teams is skew symmetric: if team 1 is 3 points ahead of team 2, then team 2 is −3-3 ahead of team 1, and each team is 0 ahead of itself. K=[03−2−3052−50],K′=[0−3230−5−250]=−KK = \begin{bmatrix} 0 & 3 & -2 \\ -3 & 0 & 5 \\ 2 & -5 & 0 \end{bmatrix}, \qquad K' = \begin{bmatrix} 0 & -3 & 2 \\ 3 & 0 & -5 \\ -2 & 5 & 0 \end{bmatrix} = -K

Theorem 1. For any square matrix AA, the matrix A+A′A + A' is symmetric and A−A′A - A' is skew symmetric.

Proof. (A+A′)′=A′+(A′)′=A′+A=A+A′(A + A')' = A' + (A')' = A' + A = A + A', so A+A′A + A' is symmetric. Also (A−A′)′=A′−A=−(A−A′)(A - A')' = A' - A = -(A - A'), so A−A′A - A' is skew symmetric. ■\blacksquare

Theorem 2. Every square matrix is the sum of a symmetric matrix and a skew symmetric matrix.

Proof. Write A=12(A+A′)+12(A−A′)A = \frac{1}{2}(A + A') + \frac{1}{2}(A - A'). By Theorem 1 and the rule (kA)′=kA′(kA)' = kA', the first part is symmetric and the second part is skew symmetric. ■\blacksquare

Example. Express B=[152346027]B = \begin{bmatrix} 1 & 5 & 2 \\ 3 & 4 & 6 \\ 0 & 2 & 7 \end{bmatrix} as the sum of a symmetric and a skew symmetric matrix.

Solution. B′=[130542267]B' = \begin{bmatrix} 1 & 3 & 0 \\ 5 & 4 & 2 \\ 2 & 6 & 7 \end{bmatrix}. Then B+B′=[2828882814]B + B' = \begin{bmatrix} 2 & 8 & 2 \\ 8 & 8 & 8 \\ 2 & 8 & 14 \end{bmatrix} and B−B′=[022−204−2−40]B - B' = \begin{bmatrix} 0 & 2 & 2 \\ -2 & 0 & 4 \\ -2 & -4 & 0 \end{bmatrix}. So P=12(B+B′)=[141444147],Q=12(B−B′)=[011−102−1−20]P = \tfrac{1}{2}(B + B') = \begin{bmatrix} 1 & 4 & 1 \\ 4 & 4 & 4 \\ 1 & 4 & 7 \end{bmatrix}, \qquad Q = \tfrac{1}{2}(B - B') = \begin{bmatrix} 0 & 1 & 1 \\ -1 & 0 & 2 \\ -1 & -2 & 0 \end{bmatrix} PP is symmetric, QQ is skew symmetric, and P+Q=[152346027]=BP + Q = \begin{bmatrix} 1 & 5 & 2 \\ 3 & 4 & 6 \\ 0 & 2 & 7 \end{bmatrix} = B.

EXERCISE 3.3

421 words · 2 min read
  1. Find the transpose of (i) [72−5]\begin{bmatrix} 7 \\ 2 \\ -5 \end{bmatrix} (ii) [1−234]\begin{bmatrix} 1 & -2 \\ 3 & 4 \end{bmatrix} (iii) [4−12703]\begin{bmatrix} 4 & -1 \\ 2 & 7 \\ 0 & 3 \end{bmatrix}.
  2. Let A=[4−12703]A = \begin{bmatrix} 4 & -1 \\ 2 & 7 \\ 0 & 3 \end{bmatrix} and B=[125−430]B = \begin{bmatrix} 1 & 2 \\ 5 & -4 \\ 3 & 0 \end{bmatrix}. Verify that (A+B)′=A′+B′(A + B)' = A' + B'.
  3. Let A=[2135]A = \begin{bmatrix} 2 & 1 \\ 3 & 5 \end{bmatrix} and B=[0412]B = \begin{bmatrix} 0 & 4 \\ 1 & 2 \end{bmatrix}. Verify that (AB)′=B′A′(AB)' = B'A'.
  4. Show that [147425753]\begin{bmatrix} 1 & 4 & 7 \\ 4 & 2 & 5 \\ 7 & 5 & 3 \end{bmatrix} is symmetric and [03−2−3052−50]\begin{bmatrix} 0 & 3 & -2 \\ -3 & 0 & 5 \\ 2 & -5 & 0 \end{bmatrix} is skew symmetric.
  5. For E=[2468]E = \begin{bmatrix} 2 & 4 \\ 6 & 8 \end{bmatrix}, verify that E+E′E + E' is symmetric and E−E′E - E' is skew symmetric.
  6. Express [312054769]\begin{bmatrix} 3 & 1 & 2 \\ 0 & 5 & 4 \\ 7 & 6 & 9 \end{bmatrix} as the sum of a symmetric and a skew symmetric matrix.
  7. Choose the correct answer. If AA and BB are symmetric matrices of the same order, then AB−BAAB - BA is (A) symmetric (B) skew symmetric (C) the zero matrix (D) the identity matrix.
  8. Prove that the diagonal entries of a skew symmetric matrix are all 0.

Answers

  1. (i) [72−5]\begin{bmatrix} 7 & 2 & -5 \end{bmatrix} (ii) [13−24]\begin{bmatrix} 1 & 3 \\ -2 & 4 \end{bmatrix} (iii) [420−173]\begin{bmatrix} 4 & 2 & 0 \\ -1 & 7 & 3 \end{bmatrix}
  2. (A+B)′=[573133]=A′+B′(A + B)' = \begin{bmatrix} 5 & 7 & 3 \\ 1 & 3 & 3 \end{bmatrix} = A' + B'.
  3. AB=[110522]AB = \begin{bmatrix} 1 & 10 \\ 5 & 22 \end{bmatrix}, so (AB)′=[151022](AB)' = \begin{bmatrix} 1 & 5 \\ 10 & 22 \end{bmatrix}, and B′A′=[151022]B'A' = \begin{bmatrix} 1 & 5 \\ 10 & 22 \end{bmatrix}. They match.
  4. The first matrix equals its transpose. For the second, K′=−KK' = -K (see 3.6).
  5. E+E′=[4101016]E + E' = \begin{bmatrix} 4 & 10 \\ 10 & 16 \end{bmatrix} is symmetric; E−E′=[0−220]E - E' = \begin{bmatrix} 0 & -2 \\ 2 & 0 \end{bmatrix} is skew symmetric.
  6. Symmetric part [30.54.50.5554.559]\begin{bmatrix} 3 & 0.5 & 4.5 \\ 0.5 & 5 & 5 \\ 4.5 & 5 & 9 \end{bmatrix} and skew symmetric part [00.5−2.5−0.50−12.510]\begin{bmatrix} 0 & 0.5 & -2.5 \\ -0.5 & 0 & -1 \\ 2.5 & 1 & 0 \end{bmatrix}.
  7. (B). (AB−BA)′=B′A′−A′B′=BA−AB=−(AB−BA)(AB - BA)' = B'A' - A'B' = BA - AB = -(AB - BA).
  8. If A′=−AA' = -A then aii=−aiia_{ii} = -a_{ii}, so 2aii=02a_{ii} = 0 and aii=0a_{ii} = 0.

3.7 Invertible Matrices

514 words · 2 min read

With numbers, the reciprocal of 5 is 15\frac{1}{5}, because 5×15=15 \times \frac{1}{5} = 1. The matrix version of "1" is the identity matrix, so we define:

A square matrix AA of order nn is invertible if there is a square matrix BB of the same order with AB=BA=IAB = BA = I. Then BB is called the inverse of AA and is written A−1A^{-1}.

In simple words: A−1A^{-1} is the matrix that undoes AA. Multiplying by AA and then by A−1A^{-1} brings every matrix back to where it started.

Example 1. Show that B=[3−1−52]B = \begin{bmatrix} 3 & -1 \\ -5 & 2 \end{bmatrix} is the inverse of A=[2153]A = \begin{bmatrix} 2 & 1 \\ 5 & 3 \end{bmatrix}.

Solution. AB=[2⋅3+1⋅(−5)2⋅(−1)+1⋅25⋅3+3⋅(−5)5⋅(−1)+3⋅2]=[1001]=IAB = \begin{bmatrix} 2 \cdot 3 + 1 \cdot (-5) & 2 \cdot (-1) + 1 \cdot 2 \\ 5 \cdot 3 + 3 \cdot (-5) & 5 \cdot (-1) + 3 \cdot 2 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = I and BA=[1001]=IBA = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = I. Since AB=BA=IAB = BA = I, B=A−1B = A^{-1}.

Example 2. Is [31−52]\begin{bmatrix} 3 & 1 \\ -5 & 2 \end{bmatrix} the inverse of AA above? Solution. A[31−52]=[14011]≠IA\begin{bmatrix} 3 & 1 \\ -5 & 2 \end{bmatrix} = \begin{bmatrix} 1 & 4 \\ 0 & 11 \end{bmatrix} \neq I, so no.

  • Only square matrices can have inverses. A rectangular matrix has none, because ABAB and BABA would have different orders.
  • If BB is the inverse of AA, then AA is the inverse of BB.
  • Not every square matrix has an inverse, just as the number 0 has no reciprocal. For example, the zero matrix has none.

Theorem 3 (the inverse is unique). A square matrix has at most one inverse.

Proof. Suppose BB and CC are both inverses of AA. Then B=BI=B(AC)=(BA)C=IC=CB = BI = B(AC) = (BA)C = IC = C. ■\blacksquare

Theorem 4. If AA and BB are invertible matrices of the same order, then ABAB is invertible and (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}.

Proof. (AB)(B−1A−1)=A(BB−1)A−1=AIA−1=AA−1=I(AB)(B^{-1}A^{-1}) = A(BB^{-1})A^{-1} = AIA^{-1} = AA^{-1} = I, and similarly (B−1A−1)(AB)=I(B^{-1}A^{-1})(AB) = I. ■\blacksquare

Memory aid: to undo "put on socks, then put on shoes", you must first take off the shoes and then the socks. The order reverses.

Check. Let AA be as above and B=[1201]B = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} with B−1=[1−201]B^{-1} = \begin{bmatrix} 1 & -2 \\ 0 & 1 \end{bmatrix}. Then AB=[25513]AB = \begin{bmatrix} 2 & 5 \\ 5 & 13 \end{bmatrix} and B−1A−1=[13−5−52]B^{-1}A^{-1} = \begin{bmatrix} 13 & -5 \\ -5 & 2 \end{bmatrix}. Multiplying gives (AB)[13−5−52]=[1001]=I(AB)\begin{bmatrix} 13 & -5 \\ -5 & 2 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = I, so (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}.

A message is turned into numbers, m=[74]m = \begin{bmatrix} 7 \\ 4 \end{bmatrix}, and scrambled by multiplying by a coding matrix AA: Am=[1847]Am = \begin{bmatrix} 18 \\ 47 \end{bmatrix}. Anyone who knows A−1A^{-1} can unscramble it: A−1(Am)=[74]A^{-1}(Am) = \begin{bmatrix} 7 \\ 4 \end{bmatrix}, the original message. Without A−1A^{-1} the scrambled numbers are hard to read. This is the idea behind some codes in cryptography.

EXERCISE 3.4

210 words · 1 min read
  1. Show that [1−2−13]\begin{bmatrix} 1 & -2 \\ -1 & 3 \end{bmatrix} is the inverse of [3211]\begin{bmatrix} 3 & 2 \\ 1 & 1 \end{bmatrix}.
  2. Show that [2412]\begin{bmatrix} 2 & 4 \\ 1 & 2 \end{bmatrix} and [1001]\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} are not inverses of each other.
  3. The coding matrix is E=[1213]E = \begin{bmatrix} 1 & 2 \\ 1 & 3 \end{bmatrix} and its inverse is E−1=[3−2−11]E^{-1} = \begin{bmatrix} 3 & -2 \\ -1 & 1 \end{bmatrix}. Code the message m=[52]m = \begin{bmatrix} 5 \\ 2 \end{bmatrix}, then decode it again.
  4. If AA and BB are invertible matrices of the same order, simplify (AB)−1A(AB)^{-1}A.
  5. Choose the correct answer. Matrices AA and BB are inverses of each other only if (A) AB=BAAB = BA (B) AB=BA=OAB = BA = O (C) AB=OAB = O, BA=IBA = I (D) AB=BA=IAB = BA = I.

Answers

  1. AB=[1001]AB = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} and BA=[1001]BA = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}; both are II.
  2. [2412][1001]=[2412]\begin{bmatrix} 2 & 4 \\ 1 & 2 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 2 & 4 \\ 1 & 2 \end{bmatrix}, which is not II.
  3. Coded: Em=[911]Em = \begin{bmatrix} 9 \\ 11 \end{bmatrix}. Decoded: E−1(Em)=[52]E^{-1}(Em) = \begin{bmatrix} 5 \\ 2 \end{bmatrix}.
  4. (AB)−1A=B−1A−1A=B−1(AB)^{-1}A = B^{-1}A^{-1}A = B^{-1}.
  5. (D).

Miscellaneous Examples

426 words · 2 min read

Example 1. Let T=[1201]T = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}. Show that Tn=[12n01]T^n = \begin{bmatrix} 1 & 2n \\ 0 & 1 \end{bmatrix} for every natural number nn.

Solution. First look at small cases: T2=[1401]T^2 = \begin{bmatrix} 1 & 4 \\ 0 & 1 \end{bmatrix}, T3=[1601]T^3 = \begin{bmatrix} 1 & 6 \\ 0 & 1 \end{bmatrix}, T4=[1801]T^4 = \begin{bmatrix} 1 & 8 \\ 0 & 1 \end{bmatrix}. The pattern suggests the formula, so we prove it by induction.

  • Start: for n=1n = 1, T1=[1201]T^1 = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} matches the formula.
  • Step: assume Tk=[12k01]T^k = \begin{bmatrix} 1 & 2k \\ 0 & 1 \end{bmatrix} for some kk. Then Tk+1=TkT=[12k01][1201]=[12k+201]=[12(k+1)01]T^{k+1} = T^kT = \begin{bmatrix} 1 & 2k \\ 0 & 1 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 2k + 2 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 2(k+1) \\ 0 & 1 \end{bmatrix}, which is the formula for n=k+1n = k + 1.
Idea of induction: think of a line of dominoes. If the first domino falls, and every falling domino knocks over the next, then they all fall. Here "falls" means "the formula is true".

Example 2. If AA and BB are symmetric matrices of the same order, show that ABAB is symmetric if and only if AB=BAAB = BA.

Solution. Since A′=AA' = A and B′=BB' = B, we have (AB)′=B′A′=BA(AB)' = B'A' = BA. Now ABAB is symmetric exactly when (AB)′=AB(AB)' = AB, that is, exactly when BA=ABBA = AB. ■\blacksquare

For instance, A=[1223]A = \begin{bmatrix} 1 & 2 \\ 2 & 3 \end{bmatrix} and B=[0112]B = \begin{bmatrix} 0 & 1 \\ 1 & 2 \end{bmatrix} are symmetric, but AB=[2538]AB = \begin{bmatrix} 2 & 5 \\ 3 & 8 \end{bmatrix} is not symmetric, and indeed BA=[2358]≠ABBA = \begin{bmatrix} 2 & 3 \\ 5 & 8 \end{bmatrix} \neq AB.

Example 3. Find the matrix DD such that CD=ECD = E, where C=[1235]C = \begin{bmatrix} 1 & 2 \\ 3 & 5 \end{bmatrix} and E=[27617]E = \begin{bmatrix} 2 & 7 \\ 6 & 17 \end{bmatrix}.

Solution. DD must be 2×22 \times 2. Let D=[abcd]D = \begin{bmatrix} a & b \\ c & d \end{bmatrix}. Then CD=[a+2cb+2d3a+5c3b+5d]CD = \begin{bmatrix} a + 2c & b + 2d \\ 3a + 5c & 3b + 5d \end{bmatrix}. Equating entries with EE gives a+2c=2a + 2c = 2, 3a+5c=63a + 5c = 6, b+2d=7b + 2d = 7, 3b+5d=173b + 5d = 17. From the first pair, a=2−2ca = 2 - 2c, so 3(2−2c)+5c=63(2 - 2c) + 5c = 6 gives c=0c = 0 and a=2a = 2. From the second pair, b=7−2db = 7 - 2d, so 3(7−2d)+5d=173(7 - 2d) + 5d = 17 gives d=4d = 4 and b=−1b = -1. Hence D=[2−104]D = \begin{bmatrix} 2 & -1 \\ 0 & 4 \end{bmatrix}.

*Miscellaneous Exercise on Chapter 3*

358 words · 2 min read
  1. If AA and BB are symmetric matrices of the same order, prove that AB−BAAB - BA is skew symmetric.
  2. If N=[2−112]N = \begin{bmatrix} 2 & -1 \\ 1 & 2 \end{bmatrix}, show that N2−4N+5I=ON^2 - 4N + 5I = O.
  3. Find xx if [ x    1 ][1223][x1]=[0][\,x \;\; 1\,]\begin{bmatrix} 1 & 2 \\ 2 & 3 \end{bmatrix}\begin{bmatrix} x \\ 1 \end{bmatrix} = [0].
  4. Two shops sell three products. The quantities sold are [400300200250500350]\begin{bmatrix} 400 & 300 & 200 \\ 250 & 500 & 350 \end{bmatrix} (rows: shops). The selling prices are 5, 4 and 3, and the costs are 3, 3 and 2 per unit. Use matrix multiplication to find the revenue, the cost and the profit of each shop.
  5. Find the matrix XX such that XA=BXA = B, where A=[1201]A = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}, B=[3456]B = \begin{bmatrix} 3 & 4 \\ 5 & 6 \end{bmatrix} and A−1=[1−201]A^{-1} = \begin{bmatrix} 1 & -2 \\ 0 & 1 \end{bmatrix}.
  6. Choose the correct answer. If AA is a square matrix with A2=AA^2 = A, then A3A^3 equals (A) AA (B) II (C) OO (D) 2A2A.
  7. Choose the correct answer. If AA is a 2×22 \times 2 skew symmetric matrix with a12=5a_{12} = 5, then AA is (A) [0550]\begin{bmatrix} 0 & 5 \\ 5 & 0 \end{bmatrix} (B) [05−50]\begin{bmatrix} 0 & 5 \\ -5 & 0 \end{bmatrix} (C) [5005]\begin{bmatrix} 5 & 0 \\ 0 & 5 \end{bmatrix} (D) [0−550]\begin{bmatrix} 0 & -5 \\ 5 & 0 \end{bmatrix}.

Answers

  1. (AB−BA)′=B′A′−A′B′=BA−AB=−(AB−BA)(AB - BA)' = B'A' - A'B' = BA - AB = -(AB - BA).
  2. N2=[3−443]N^2 = \begin{bmatrix} 3 & -4 \\ 4 & 3 \end{bmatrix}, 4N=[8−448]4N = \begin{bmatrix} 8 & -4 \\ 4 & 8 \end{bmatrix}, so N2−4N+5I=[0000]N^2 - 4N + 5I = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}.
  3. Multiplying out, x2+4x+3=0x^2 + 4x + 3 = 0, so x=−1x = -1 or x=−3x = -3.
  4. Revenue [38004300]\begin{bmatrix} 3800 \\ 4300 \end{bmatrix}, cost [25002950]\begin{bmatrix} 2500 \\ 2950 \end{bmatrix}, profit [13001350]\begin{bmatrix} 1300 \\ 1350 \end{bmatrix} (shop 1 and shop 2 in order).
  5. X=BA−1=[3−25−4]X = BA^{-1} = \begin{bmatrix} 3 & -2 \\ 5 & -4 \end{bmatrix}.
  6. (A). A3=A2A=AA=A2=AA^3 = A^2A = AA = A^2 = A.
  7. (B). For skew symmetric AA, a21=−a12=−5a_{21} = -a_{12} = -5 and the diagonal is 0.

Summary

240 words · 1 min read

The chapter in plain words

  • A matrix is a rectangular table of numbers. Its order is "rows × columns", and aija_{ij} is the entry in row ii, column jj.
  • Special matrices: column, row, square, diagonal, scalar, identity (II) and zero (OO).
  • Two matrices are equal if they have the same order and equal entries in every position.
  • Addition and subtraction work entry by entry and need the same order. Scalar multiplication multiplies every entry.
  • Addition is commutative and associative; OO is the additive identity and −A-A is the additive inverse. Also k(A+B)=kA+kBk(A + B) = kA + kB and (k+l)A=kA+lA(k + l)A = kA + lA.
  • Multiplication ABAB needs (columns of AA) = (rows of BB). Each entry is a row of AA times a column of BB. In general AB≠BAAB \neq BA, and AB=OAB = O does not force A=OA = O or B=OB = O. It is associative and distributive, and IA=AI=AIA = AI = A.
  • The transpose A′A' swaps rows and columns. (A′)′=A(A')' = A, (kA)′=kA′(kA)' = kA', (A+B)′=A′+B′(A + B)' = A' + B' and (AB)′=B′A′(AB)' = B'A'.
  • AA is symmetric if A′=AA' = A and skew symmetric if A′=−AA' = -A (diagonal all 0). Every square matrix is the sum of a symmetric and a skew symmetric matrix: A=12(A+A′)+12(A−A′)A = \frac{1}{2}(A + A') + \frac{1}{2}(A - A').
  • The inverse A−1A^{-1} satisfies AA−1=A−1A=IAA^{-1} = A^{-1}A = I. It exists only for some square matrices, it is unique, and (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}.

NOTES

37 words · 1 min read

This chapter covers the matrices topics of the Class 12 mathematics syllabus. The explanations, examples, figures and exercises were written for this library, and every worked answer was computed and checked by a program.

Up next
Continue to the next chapter