A75 of 56
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A7 · Lesson 5 · Matrix multiplication

Doing one transformation after another

A filter feeds an amplifier, which feeds a cable, which feeds a load. Each stage can be described by a 2 × 2 matrix relating the voltage and current at its input to those at its output. To get the whole chain, you multiply the matrices. The rule for multiplying them looks arbitrary at first, rows times columns, but it's forced by one requirement: the product must do what the two matrices do, one after the other.

  • Matrix A rotates the plane by θ; matrix B stretches it sideways by s.
  • The solid curve is the unit circle after AB (stretch first, then rotate). The dashed curve is after BA (rotate first, then stretch).
  • Are they the same shape? Find settings where they match, and settings where they're far apart.

Predict

You stretch the plane sideways and then rotate it, or rotate first and then stretch. Do you get the same result?

Name it

The rule

If A is m×n and B is n×p, then AB is m×p, and its entry in row i, column j is row i of A dotted with column j of B:

(AB)ij=∑kaikbkj

The inner sizes must match (n), and the outer sizes give the shape of the result.

Why it's this rule

(AB)𝐱 must equal A(B𝐱): first apply B, then A. Column j of AB is A times column j of B, which is where the jth basis vector ends up after both steps. Writing that out gives the row-times-column rule.

Properties

  • Not commutative: usually AB≠BA. Read AB right to left: B acts first.
  • Associative: (AB)C=A(BC), so a chain of stages can be grouped any way.
  • Identity: I has ones on the diagonal; AI=IA=A.
  • Distributive: A(B+C)=AB+AC.

Cascading two-ports

A two-port network (a stage with an input and an output) has a transmission matrix relating input voltage and current to output voltage and current:

[V1I1]=[𝒜ℬ𝒞𝒟][V2I2]

A series impedance Z is [1Z01]; a shunt admittance Y is [10Y1]. A chain of stages has the product of their matrices, in order from input to output. With the output open (I2=0), the voltage gain is V2/V1=1/𝒜. S6 uses these for RF networks.

Worked example

Compute AB and BA for A=[1234], B=[5678].

Show the solution
  1. Row 1 of AB. Row 1 of A times the columns of B: 1⋅5+2⋅7=19 1⋅6+2⋅8=22
  2. Row 2 of AB. 3⋅5+4⋅7=43 3⋅6+4⋅8=50
  3. The two products. AB=[19224350] BA=[23343146] Different, as expected.

Answer AB=[19224350] and BA=[23343146], which are different.

Worked example

A 1 kΩ series resistor is followed by a 1 kΩ shunt resistor. Find the chain's transmission matrix and its open-circuit voltage gain.

Show the solution
  1. Multiply the series and shunt matrices. [1100001][100.0011]=[1+110000.0011]=[210000.0011]
  2. Gain. The open-circuit gain is one over the top-left entry: 1/𝒜=12 an ordinary voltage divider, found by multiplying matrices.

Answer the chain's transmission matrix is [210000.0011], and its open-circuit gain is 12.

Worked example

Multiply the 30° rotation matrix by itself and show the product is the 60° rotation.

Show the solution
  1. The 30° rotation. R30=[0.866−0.50.50.866]
  2. Diagonal entries of R30R30. 0.8662−0.25=0.5
  3. Off-diagonal entries. The bottom-left is 2(0.5)(0.866)=0.866 and the top-right is −2(0.866)(0.5)=−0.866.
  4. The product. R30R30=[0.5−0.8660.8660.5] That's cos⁡60° and sin⁡60° in the right places.
  5. The double-angle formulas. The entries are cos⁡2θ=cos2⁡θ−sin2⁡θ sin⁡2θ=2sin⁡θcos⁡θ which matrix multiplication proves without any trigonometry.

Answer R30R30=[0.5−0.8660.8660.5], the 60° rotation.

Check

For A=[1312] and B=[20−31], what is the top-left entry of AB?

Check

For A=[1023] and B=[47−12], what is the bottom-left entry of AB?

Check

A is 3 × 2 and B is 2 × 4. What is AB?

Check

A series resistor R1 = 1 kΩ is followed by a shunt R2 = 2 kΩ. What is the top-left entry 𝒜 of the chain's transmission matrix?

Check

For A=[1201] and B=[10−11], what is the top-left entry of AB? (Compare BA, whose top-left entry is 1.)

Check

What is the top-right entry of [1101]5?

Check

Take A=[2101] and B=[1011].

(a)

What is the top-left entry of AB?

(b)

What is the bottom-right entry of BA?

Check

A series impedance x is followed by a shunt admittance y.

Step 1

What is the top-left entry 𝒜 of [1x01][10y1]?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why is AB usually different from BA?

Practice

Keep practicing

9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.