Linear-Algebra-Done-Right ยท Unit 6 ยท Video 2 ยท Interactive Practice

Matrix Operations and Why Multiplication Is Row Times Column

IKey Formulas

FormulaNameMeaning
(A+C)j,k=Aj,k+Cj,k(A + C)_{j,k} = A_{j,k} + C_{j,k}, ย (ฮปA)j,k=ฮปAj,k\ (\lambda A)_{j,k} = \lambda A_{j,k}Entrywise sum and scalar multipleSame size only; they give M(S+T)=M(S)+M(T)\mathcal{M}(S + T) = \mathcal{M}(S) + \mathcal{M}(T) and M(ฮปT)=ฮปM(T)\mathcal{M}(\lambda T) = \lambda \mathcal{M}(T)
dimโกFm,n=mn\dim \mathbf{F}^{m,n} = mnThe space of mร—nm \times n matricesBasis: the mnmn matrices Ej,kE_{j,k} with a single 11 in row jj, column kk; A=โˆ‘j,kAj,kEj,kA = \sum_{j,k} A_{j,k} E_{j,k}
(AB)j,k=โˆ‘r=1nAj,rBr,k(AB)_{j,k} = \sum_{r=1}^{n} A_{j,r} B_{r,k}Matrix productAA is mร—nm \times n, BB is nร—pn \times p, ABAB is mร—pm \times p: row jj of AA times column kk of BB
M(ST)=M(S)โ€‰M(T)\mathcal{M}(ST) = \mathcal{M}(S)\,\mathcal{M}(T)Composition becomes multiplicationTโˆˆL(U,V)T \in \mathcal{L}(U, V), SโˆˆL(V,W)S \in \mathcal{L}(V, W), one basis for each of UU, VV, WW

Key Insight: The row-times-column rule is forced, not chosen: it is the only product that makes M(ST)=M(S)M(T)\mathcal{M}(ST) = \mathcal{M}(S)\mathcal{M}(T) true, and the inner size nn that must match is dimโกV\dim V, the space in the middle.

IIAdding and Scaling Entry by Entry

Each entry of ฮปA+C\lambda A + C uses only the entries of AA and CC in the same position.

IIIRow Times Column

Entry (j,k)(j, k) of ABAB pairs row jj of AA with column kk of BB, so the inner sizes must agree.

IVComposition Becomes Multiplication

Applying TT then SS moves uu exactly as AB=M(S)M(T)AB = \mathcal{M}(S)\mathcal{M}(T) does; the other order uses BABA.

๐Ÿ’ก Order aside, matrix multiplication keeps the laws that products of linear maps have: (AB)C=A(BC)(AB)C = A(BC), A(B+C)=AB+ACA(B + C) = AB + AC and (A+B)C=AC+BC(A + B)C = AC + BC.

VQuiz Questions

Problem 1 ยท A Linear Combination of Matrices

Given: A=(1โˆ’230)A = \begin{pmatrix} 1 & -2 \\ 3 & 0 \end{pmatrix} and C=(41โˆ’15)C = \begin{pmatrix} 4 & 1 \\ -1 & 5 \end{pmatrix}. Find 3Aโˆ’C3A - C.

โœ… Correct! Each entry is 3Aj,kโˆ’Cj,k3A_{j,k} - C_{j,k}; for example the bottom-left entry is 3โ‹…3โˆ’(โˆ’1)=103 \cdot 3 - (-1) = 10.
โŒ Not quite. That is 3A+C3A + C. Subtracting CC means adding (โˆ’1)C(-1)C, so every entry of CC changes sign.
โŒ Not quite. That is 3(Aโˆ’C)=3Aโˆ’3C3(A - C) = 3A - 3C. The scalar 33 multiplies only AA.
โŒ Not quite. That is Aโˆ’3CA - 3C: the 33 was applied to the wrong matrix.
Show solution

Scalar multiplication multiplies every entry, and 3Aโˆ’C=3A+(โˆ’1)C3A - C = 3A + (-1)C is computed entry by entry:

3A=(3โˆ’690),3Aโˆ’C=(3โˆ’4โˆ’6โˆ’19โˆ’(โˆ’1)0โˆ’5)=(โˆ’1โˆ’710โˆ’5)3A = \begin{pmatrix} 3 & -6 \\ 9 & 0 \end{pmatrix}, \qquad 3A - C = \begin{pmatrix} 3 - 4 & -6 - 1 \\ 9 - (-1) & 0 - 5 \end{pmatrix} = \begin{pmatrix} -1 & -7 \\ 10 & -5 \end{pmatrix}

Problem 2 ยท Sizes Decide What Exists

Given: AโˆˆF2,5A \in \mathbf{F}^{2,5}, BโˆˆF5,3B \in \mathbf{F}^{5,3} and CโˆˆF3,2C \in \mathbf{F}^{3,2}.

Which product is NOT defined?

What is the size of ABCABC?

What is dimโกF2,5\dim \mathbf{F}^{2,5}, the space containing AA?

โœ… Correct! BABA fails because BB has 33 columns and AA has 22 rows; ABCABC is 2ร—22 \times 2; and dimโกF2,5=2โ‹…5=10\dim \mathbf{F}^{2,5} = 2 \cdot 5 = 10.
โŒ Not quite. CC is 3ร—23 \times 2 and AA is 2ร—52 \times 5: the inner sizes are both 22, so CACA exists and is 3ร—53 \times 5.
โŒ Not quite. BB is 5ร—35 \times 3 and CC is 3ร—23 \times 2: the inner sizes are both 33, so BCBC exists and is 5ร—25 \times 2.
โŒ Not quite. AA is 2ร—52 \times 5 and BB is 5ร—35 \times 3: the inner sizes are both 55, so ABAB exists and is 2ร—32 \times 3.
โŒ Not quite. 2ร—32 \times 3 is the size of ABAB; multiplying by the 3ร—23 \times 2 matrix CC changes the column count to 22.
โŒ Not quite. 5ร—35 \times 3 is the size of BB. A product keeps the OUTER sizes: rows from the first factor, columns from the last.
โŒ Not quite. 3ร—23 \times 2 is the size of CC alone; the row count of ABCABC comes from AA.
โŒ Not quite. 2+52 + 5 counts rows plus columns, but the basis has one matrix Ej,kE_{j,k} per position, and there are 2โ‹…52 \cdot 5 positions.
โŒ Not quite. 55 is the number of columns. Each of the 2โ‹…52 \cdot 5 positions carries its own basis matrix Ej,kE_{j,k}.
โŒ Not quite. 25=5โ‹…525 = 5 \cdot 5 would be dimโกF5,5\dim \mathbf{F}^{5,5}; a 2ร—52 \times 5 matrix has 2โ‹…52 \cdot 5 positions.
Show solution

A product of an mร—nm \times n and a qร—pq \times p matrix is defined exactly when n=qn = q, because the index rr in โˆ‘rAj,rBr,k\sum_{r} A_{j,r}B_{r,k} runs over the columns of the first and the rows of the second at once.

  • ABAB: (2ร—5)(5ร—3)(2 \times 5)(5 \times 3), defined, 2ร—32 \times 3. ย BC\ BC: (5ร—3)(3ร—2)(5 \times 3)(3 \times 2), defined, 5ร—25 \times 2. ย CA\ CA: (3ร—2)(2ร—5)(3 \times 2)(2 \times 5), defined, 3ร—53 \times 5.
  • BABA: (5ร—3)(2ร—5)(5 \times 3)(2 \times 5), and 3โ‰ 23 \ne 2, so BABA is not defined.
  • ABC=(AB)CABC = (AB)C: (2ร—3)(3ร—2)(2 \times 3)(3 \times 2), which is 2ร—22 \times 2.
  • F2,5\mathbf{F}^{2,5} has the basis Ej,kE_{j,k}, one for each of the 2โ‹…52 \cdot 5 positions, so its dimension is 1010.

Problem 3 ยท Two Orders, Two Entries

Given: A=(120โˆ’131)A = \begin{pmatrix} 1 & 2 & 0 \\ -1 & 3 & 1 \end{pmatrix} and B=(210โˆ’142)B = \begin{pmatrix} 2 & 1 \\ 0 & -1 \\ 4 & 2 \end{pmatrix}. Find (AB)2,1(AB)_{2,1} and (BA)3,2(BA)_{3,2}.

What is (AB)2,1(AB)_{2,1}?

What is (BA)3,2(BA)_{3,2}?

โœ… Correct! (AB)2,1=(โˆ’1)(2)+3โ‹…0+1โ‹…4=2(AB)_{2,1} = (-1)(2) + 3 \cdot 0 + 1 \cdot 4 = 2 and (BA)3,2=4โ‹…2+2โ‹…3=14(BA)_{3,2} = 4 \cdot 2 + 2 \cdot 3 = 14.
โŒ Not quite. Check the sign of the first product: A2,1B1,1=(โˆ’1)(2)=โˆ’2A_{2,1}B_{1,1} = (-1)(2) = -2, not 22.
โŒ Not quite. โˆ’1-1 is (AB)1,2(AB)_{1,2}, row 11 against column 22. Entry (2,1)(2, 1) uses row 22 of AA and column 11 of BB.
โŒ Not quite. 11 is (BA)2,1(BA)_{2,1}: it uses row 22 of BB and column 11 of AA. In ABAB the rows come from AA.
โŒ Not quite. 22 is (BA)3,3(BA)_{3,3}; column 22 of AA is (2,3)(2, 3), not (0,1)(0, 1).
โŒ Not quite. ABAB is 2ร—22 \times 2, but BABA is (3ร—2)(2ร—3)(3 \times 2)(2 \times 3), a 3ร—33 \times 3 matrix, so its (3,2)(3, 2) entry exists.
โŒ Not quite. โˆ’1-1 is (BA)2,3(BA)_{2,3}, with the indices swapped. Entry (3,2)(3, 2) uses row 33 of BB and column 22 of AA.
Show solution

AA is 2ร—32 \times 3 and BB is 3ร—23 \times 2, so ABAB is 2ร—22 \times 2 and BABA is 3ร—33 \times 3. Entry (j,k)(j, k) is row jj of the first factor times column kk of the second:

(AB)2,1=โˆ‘r=13A2,rBr,1=(โˆ’1)(2)+(3)(0)+(1)(4)=2(AB)_{2,1} = \sum_{r=1}^{3} A_{2,r}B_{r,1} = (-1)(2) + (3)(0) + (1)(4) = 2 (BA)3,2=โˆ‘r=12B3,rAr,2=(4)(2)+(2)(3)=14(BA)_{3,2} = \sum_{r=1}^{2} B_{3,r}A_{r,2} = (4)(2) + (2)(3) = 14

In full, AB=(2โˆ’12โˆ’2)AB = \begin{pmatrix} 2 & -1 \\ 2 & -2 \end{pmatrix} and BA=(1711โˆ’3โˆ’12142)BA = \begin{pmatrix} 1 & 7 & 1 \\ 1 & -3 & -1 \\ 2 & 14 & 2 \end{pmatrix}: the two orders do not even have the same size.

Problem 4 ยท The Matrix of a Composition

Given: TโˆˆL(F2,F3)T \in \mathcal{L}(\mathbf{F}^2, \mathbf{F}^3) and SโˆˆL(F3,F2)S \in \mathcal{L}(\mathbf{F}^3, \mathbf{F}^2) with T(x,y)=(x+y,ย 2y,ย x)T(x, y) = (x + y,\ 2y,\ x) and S(x,y,z)=(z,ย xโˆ’y)S(x, y, z) = (z,\ x - y), standard bases throughout. Find M(ST)\mathcal{M}(ST).

โœ… Correct! M(S)M(T)\mathcal{M}(S)\mathcal{M}(T) is (2ร—3)(3ร—2)=2ร—2(2 \times 3)(3 \times 2) = 2 \times 2, and it matches (ST)(x,y)=(x,ย xโˆ’y)(ST)(x, y) = (x,\ x - y) computed directly.
โŒ Not quite. Column kk of a matrix holds the coordinates of the image of the kk-th basis vector: (ST)(1,0)=(1,1)(ST)(1, 0) = (1, 1) is the FIRST COLUMN, not the first row.
โŒ Not quite. That 3ร—33 \times 3 matrix is M(T)M(S)=M(TS)\mathcal{M}(T)\mathcal{M}(S) = \mathcal{M}(TS). In STST the map TT acts first, and STST maps F2\mathbf{F}^2 to F2\mathbf{F}^2, so its matrix is 2ร—22 \times 2.
โŒ Not quite. The second coordinate of S(T(x,y))S(T(x, y)) is (x+y)โˆ’2y=xโˆ’y(x + y) - 2y = x - y; the yy inside x+yx + y was dropped.
Show solution

Column kk of each matrix records the image of the kk-th standard basis vector:

M(S)=(0011โˆ’10),M(T)=(110210)\mathcal{M}(S) = \begin{pmatrix} 0 & 0 & 1 \\ 1 & -1 & 0 \end{pmatrix}, \qquad \mathcal{M}(T) = \begin{pmatrix} 1 & 1 \\ 0 & 2 \\ 1 & 0 \end{pmatrix}

Row times column:

M(S)M(T)=(0+0+10+0+01โˆ’0+01โˆ’2+0)=(101โˆ’1)\mathcal{M}(S)\mathcal{M}(T) = \begin{pmatrix} 0 + 0 + 1 & 0 + 0 + 0 \\ 1 - 0 + 0 & 1 - 2 + 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 1 & -1 \end{pmatrix}

Check directly: (ST)(x,y)=S(x+y,ย 2y,ย x)=(x,ย xโˆ’y)(ST)(x, y) = S(x + y,\ 2y,\ x) = (x,\ x - y), so (ST)(1,0)=(1,1)(ST)(1, 0) = (1, 1) and (ST)(0,1)=(0,โˆ’1)(ST)(0, 1) = (0, -1) are the two columns, as M(ST)=M(S)M(T)\mathcal{M}(ST) = \mathcal{M}(S)\mathcal{M}(T) promises.

Solved: 0 / 4