Say A and B are n×n square matrices and AB=I. In other words, A is B1 and B is A1.

Here’s a question for you, from one of Boyd’s linear dynamical systems lectures: what’s the inner product of the ith row of A, ˜ai, and the jth column of B, bj? And what does the value of this inner product say about A and B?

Here’s the answer: ˜aibj is Ii,j, so it’s 0 when ij, and 1 when i=j. In other words, the ith row of A is orthogonal to the jth column of B unless i=j. As Boyd notes, this fact follows naturally from the inner product interpretation of the matrix multiplication AB=I. Yet it seems surprising. Can we get some intuition for why orthogonality shows up here?

Turns out, yeah, absolutely. This orthogonality stuff is wonderful intuition for how inverse matrices retrieve coordinates.

First, note that A is invertible, so its columns form a basis.1 So, we can express any n-dimensional vector v as a linear combination of A’s columns:

v=c1a1++cnan,

where ai are the basis vectors and ci are the coordinates of v in this basis.

So, we start with a column of coordinates [c1cn]t, and apply A to it to get v. We’d like A1v to give us back [c1cn]t.

This is in fact exactly what A1 does: it “picks out” the coordinates ci. If you want to find ci (the ith coordinate of v in the basis formed by the columns of A), you can take the dot product of the ith row of A1 with v. Specifically, if v=c1a1++cnan, then dotting the ith row of A1 with v will give you ci. Why? Because the dot products of the ith row of A1 with a1,,ai1,ai+1,,an will all give zero (by the opening fact of this post!). Only the dot product of the ith row of A1 with ai will “survive” to give 1, and that will multiply with ai’s coefficient ci to recover the coordinate ci. Repeat for all rows of A1, and you’ll get back exactly the entire column you started with: [c1cn]t.

The orthogonality condition between the the rows of A1 and the columns of A ensures that each component ci gets mapped back exactly where it came from, with no “cross-talk” between different components.

  1. Why? Because for A to have an inverse transformation — one that exactly undoes its effect on a vector — A must be both one-to-one, i.e., different inputs map to different outputs, and onto, i.e., every vector in the output space can be reached. Both of these are necessary conditions for an inverse to exist. If A is not one-to-one, we won’t be able to find exactly which input produced an output. If A is not onto, there could be some outputs we can’t reach with any inputs. Now, why does the columns of A forming a basis ensure that A is both one-to-one and onto? Because if the columns are spanning, A is onto: any output can be reached by a certain linear combination of the columns. If the columns are linearly independent, every output is a unique linear combination of the columns. If the columns are both spanning and independent, we have ourselves a basis!