Euler Hall — free maths guides

Multiply by the identity matrix

State what the identity matrix is and that it does nothing. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.

The matrix that does nothing

The identity matrix has ones on the diagonal and zeros everywhere else:

It is the matrix version of multiplying by11:

Ix=x,IA=A,AI=A.I\mathbf{x}=\mathbf{x},\qquad IA=A,\qquad AI=A.

Everything passes through unchanged. That is not a coincidence about the entries you happen to have tried — it is forced by the definition, and the why block below shows it in one line.

The size is part of the answer.II is always square, but the matrix it multiplies need not be, and the size has to make the inner dimensions cancel:

| multiply | identity needed | because | |---|---|---| |I AI\ A withAA of sizem×nm\times n |ImI_m |(m×m)(m×n)(m\times m)(m\times n) | |A IA\ I withAA of sizem×nm\times n |InI_n |(m×n)(n×n)(m\times n)(n\times n) |

For a2×32\times3AA that meansI2AI_2A andAI3AI_3 — two different identity matrices, both of which returnAA. PuttingI3I_3 on the left of a2×32\times3AA is not "the identity doing nothing"; it is a product that does not exist.

Why multiplying by I changes nothing

Compute entry(i,j)(i,j) ofIAIA: it is rowii ofII dotted with columnjj ofAA.

Rowii ofII has a single11 in positionii and zeros in every other position. So the dot product is

0⋅A1j+0⋅A2j+⋯+1⋅Aij+⋯+0⋅Amj=Aij.0\cdot A_{1j}+0\cdot A_{2j}+\cdots+1\cdot A_{ij}+\cdots+0\cdot A_{mj}=A_{ij}.

Every term but one is killed by a zero, and the survivor is multiplied by one. The product isAA entry by entry, with no room for anything to shift.

The same computation with a different row/column offset is exactly what the exchange matrix does instead: its ones sit wherei+ji+j is constant rather than wherei=ji=j, so entry(1,2)(1,2) of the product picks upA2,2A_{2,2} and entry(2,1)(2,1) picks upA1,1A_{1,1} — a swap.

The size rule falls out of the same picture. For the dot product to run at all, rowii of the left factor must have the same length as columnjj of the right one. IfII isr×rr\times r andAA ism×nm\times n, that requiresr=mr=m on the left andr=nr=n on the right.

Worked example, in the shape the exam asks

Question.A=[123456]A=\begin{bmatrix}1&2&3\\4&5&6\end{bmatrix} is2×32\times3. ComputeI2AI_2A andAI3AI_3, and say whetherI3AI_3A is defined.

Step 1 —I2AI_2A.(2×2)(2×3)(2\times2)(2\times3) cancels the 2, so the product exists and is2×32\times3. Each entry is copied:

Step 2 —AI3AI_3.(2×3)(3×3)(2\times3)(3\times3) cancels the 3, so the product exists and is2×32\times3. Again each entry is copied:

Step 3 —I3AI_3A.(3×3)(2×3)(3\times3)(2\times3): the inner pair is33 and22, which do not match. Not defined.

Answer. BothI2AI_2A andAI3AI_3 equalAA;I3AI_3A does not exist.

Step 4 — check one entry by the rule. Entry(2,3)(2,3) ofI2AI_2A: row 2 ofI2I_2 is(0,1)(0,1), column 3 ofAA is(3,6)(3,6), dot is0⋅3+1⋅6=60\cdot3+1\cdot6=6, which isA2,3A_{2,3} ✓.

By the end you can
  • State what the identity matrix is and that it does nothing
  • Choose the identity whose size fits the multiplication
  • Recover the original matrix or vector after multiplying by I
  • Notice that ones on the anti-diagonal are not the identity
Check yourself

BB is4×24\times2. Which identity matrices can multiply it, on which side, and what comes out?

Answer
  • -I4BI_4B is defined:(4×4)(4×2)=4×2(4\times4)(4\times2)=4\times2, and it equalsBB.
  • -BI2BI_2 is defined:(4×2)(2×2)=4×2(4\times2)(2\times2)=4\times2, and it equalsBB.
  • -I2BI_2B is not defined:(2×2)(4×2)(2\times2)(4\times2) has inner pair22 and44.
  • -BI4BI_4 is not defined:(4×2)(4×4)(4\times2)(4\times4) has inner pair22 and44.

So there are exactly two identities that work, they sit on opposite sides, and they have different sizes. Both returnBB unchanged.

Work out where to start — free, no accountAnswer six real questions — free, no account