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

A7 · Lesson 11 · Inverses and transposes

Undoing a matrix, and flipping it

Inject a current into node 1 of a resistor network and measure the voltage at node 2. Now inject the same current into node 2 and measure at node 1. You get exactly the same voltage, every time, however lopsided the network. This is reciprocity, and it's a fact about matrices: a resistor network's conductance matrix equals its own transpose, and so does its inverse, which is the matrix that answers "inject here, measure there".

  • The solid curve is the unit circle after matrix A; the dashed curve is the unit circle after A−1.
  • The green arrow is a vector 𝐱 moved by A; the dashed arrow is that result moved back by A−1. It always lands on the start.
  • Shrink the determinant toward zero. What happens to the inverse's ellipse?

Predict

A matrix squashes the plane flat, onto a line. Can any matrix undo it?

Name it

The inverse

A−1 is the matrix with A−1A=AA−1=I: it undoes A. It exists exactly when A is square with nonzero determinant, which is the same as having n nonzero pivots. For 2 × 2,

[abcd]−1=1ad−bc[d−b−ca]

swap the diagonal, negate the off-diagonal, divide by the determinant. For bigger matrices, Gauss-Jordan elimination on [A∣I] turns it into [I∣A−1].

Order reverses for products: (AB)−1=B−1A−1. To undo "B then A", undo A first.

Don't invert to solve. Computing A−1 and then A−1𝐛 costs about three times as much as solving with LU, and is less accurate. Use the inverse as an idea, and solve in code.

The transpose

AT flips A across its diagonal: (AT)ij=aji, so rows become columns. Its rules:

(AB)T=BTAT(AT)−1=(A−1)T𝐱⋅𝐲=𝐱T𝐲

A matrix with AT=A is symmetric. The inverse of a symmetric matrix is symmetric too.

Permutation matrices

A permutation matrix reorders rows: it's the identity with its rows shuffled. Undoing a shuffle is shuffling back, and P−1=PT.

Reciprocity

In nodal analysis (lesson 12), a resistor between nodes i and j puts −1R in both entry (i,j) and entry (j,i) of the conductance matrix G, so G is symmetric. The node voltages are 𝐯=G−1𝐢, and entry (j,i) of G−1 is the voltage at j per unit current injected at i. Since G−1 is symmetric, swapping the two nodes gives the same answer.

Worked example

Invert [4726].

Show the solution
  1. Determinant. det⁡=4×6−7×2=10
  2. Swap, negate, divide. 110[6−7−24]=[0.6−0.7−0.20.4]
  3. Check the top-left entry of the product. 4(0.6)+7(−0.2)=2.4−1.4=1

Answer the inverse is [0.6−0.7−0.20.4].

Worked example

Three 1 kΩ resistors: node 1 to ground, node 1 to node 2, node 2 to ground. Show reciprocity.

Show the solution
  1. Conductance matrix. In mS: G=[2−1−12] with determinant 3.
  2. Invert it. G−1=13[2112]kΩ
  3. Inject at each node. 1 mA into node 1 gives v2=13 V; 1 mA into node 2 gives v1=13 V.
  4. Why they match. The two off-diagonal entries are equal because G is symmetric.

Answer 1 mA into either node gives 13 V at the other, which is reciprocity.

Worked example

Invert L=[100210431], the L from an elimination.

Show the solution
  1. What L−1 does. L undoes the elimination steps, so L−1 redoes them: subtract 2 × row 1 from row 2, then 4 × row 1 and 3 × row 2 from row 3.
  2. Apply those steps to I. L−1=[100−2102−31]
  3. The corner entry. It is 2⋅3−4=2 not −4: the steps interact.
  4. Why keep L. That's why L, which stores the multipliers directly, is the convenient one to keep.

Answer L−1 has rows (1,0,0), (−2,1,0) and (2,−3,1).

Check

What is the top-left entry of [47−15]−1?

Check

What is the top-right entry of [47−15]−1?

Check

What is (AB)−1?

Check

What is (AB)T?

Check

Resistors: 1 kΩ from node 1 to ground, 1 kΩ from node 1 to node 2, 4 kΩ from node 2 to ground. Inject 1 mA into node 2. What is the voltage at node 1?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

Check

P is a permutation matrix. What is P−1?

Check

Invert A=[3111].

(a)

What is the top-left entry of A−1?

(b)

What is the top-right entry?

Check

Invert the rotation R=[cos⁡t−sin⁡tsin⁡tcos⁡t].

Step 1

Rotating back by −t undoes it. What is the top-right entry of R−1?

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

In code, why do you solve A𝐱=𝐛 with a solver instead of computing A−1 and multiplying?

Practice

Keep practicing

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