Inverse matrices¶
Let
-
Because
is linear, we get and applying on both sides gives -
Because
is linear, we can also move any number inside it, so and applying on both sides gives .
If a function is linear and its inverse function exists, the inverse function is also linear.
Recall that any matrix
Examples:
-
Let
be the matrix that rotates by an angle . Its inverse matrix rotates by the same angle, but in the opposite direction, so -
The inverse function of "do nothing" is "do nothing", so
the inverse of the identity matrix is the identity matrix,
. -
The inverse of the zero matrix
is undefined, because the linear function corresponding to the zero matrix always outputs the zero vector, regardless of what the input was. -
The matrix
multiplies a vector by 5, because for any vector (see here for more details). The inverse matrix should divide the vector by 5, so it is .
When does an inverse matrix exist?¶
As explained here,
the inverse function of
-
The function
gives different outputs for different inputs. -
The function
produces each output with some input.
Let
If the columns of a matrix are linearly dependent,
it means that one of them is a linear combination of others,
which then means that you can multiply the matrix with two different vectors and get the same resulting vector.
For example, if a matrix
A matrix produces different outputs for different inputs if and only if the columns of the matrix are linearly independent.
In other words, linear independence is needed for a matrix to be invertible, and it is enough to take care of condition 1.
Let's look at the second condition.
Consider the set of all output vectors of the matrix;
that is, the set of all vectors
A matrix with height
From here, we split this into 3 cases. We can assume that the columns are linearly independent, because we will need that anyway for the first condition.
-
If the matrix is an
matrix (same width and height, i.e. a square matrix), then independentness alone is enough to guarantee that the matrix is invertible: there are columns and each column is an -dimensional vector, and the span of linearly independent -dimensional vectors is the set of all -dimensional vectors. -
If
, the columns are -dimensional vectors and there are more than columns, where is the height of the matrix. This means that they can't be linearly independent, so matrices like this are not invertible. -
If
is invertible, then the inverse is also invertible, with the original matrix as its inverse. Consider a matrix that has width 3 and height 4. It takes in 3D vectors and outputs 4D vectors, so its inverse , if it exists, takes in 4D vectors and outputs 3D vectors, and would have as its inverse matrix. So would be an invertible matrix with width 4 and height 3. As shown above, this isn't possible, and therefore matrices with can't be invertible.
We can now summarize invertibility into a very simple condition:
A matrix is invertible if and only if it is a square matrix and its columns are linearly independent.