Identity Matrix

When you multiply a matrix (A)(A) by the Identity Matrix (I)(I), you get the original matrix back.

AI=AA \cdot I = A

It's the equivalent of multiplication with the number 1 in scalar math.

The Identity Matrix is a square: it has an equal number of rows and columns. It has the value 1 in the main diagonal from left to right and 0 everywhere else.

An identity matrix can have any number of dimensions.

In notation, we represent an Identity Matrix with II and the number of dimensions nn. For example, the Identity Matrix with three dimensions is I3I_{3}.

I3=[100010001]I_3 = \begin{bmatrix}\color{olive}{1} & 0 & 0 \\ 0 & \color{olive}{1} & 0 \\ 0 & 0 & \color{olive}{1} \end{bmatrix}

If we are doing Matrix Multiplication with the Identity Matrix and another square matrix, the Identity Matrix should have dimensions equal to the other matrix. The multiplication is commutive in this case: InA(n×n)=A(n×n)InI_n \cdot A_{(n \times n)} = A_{(n \times n)} \cdot I_n

[2413][1001]=[1001][2413]\begin{bmatrix}2 & 4 \\ 1 & 3\end{bmatrix} \begin{bmatrix}\color{olive}{1} & 0 \\ 0 & \color{olive}{1}\end{bmatrix} = \begin{bmatrix}\color{olive}{1} & 0 \\ 0 & \color{olive}{1}\end{bmatrix} \begin{bmatrix}2 & 4 \\ 1 & 3\end{bmatrix}

If the original matrix is rectangular and has dimensions m×nm \times n, the size of the identity depends on which side of the expression it's on ImA(m×n)=A(m×n)InI_m \cdot A_{(m \times n)} = A_{(m \times n)} \cdot I_n

[1001][245132]=[245132][100010001]\begin{bmatrix}\color{olive}{1} & 0 \\ 0 & \color{olive}{1}\end{bmatrix} \begin{bmatrix}2 & 4 & 5 \\ 1 & 3 & -2\end{bmatrix} = \begin{bmatrix}2 & 4 & 5 \\ 1 & 3 & -2\end{bmatrix} \begin{bmatrix}\color{olive}{1} & 0 & 0 \\ 0 & \color{olive}{1} & 0 \\ 0 & 0 & \color{olive}{1}\end{bmatrix}

In this Matrix Multiplication example, we can see how the main diagonal of 1s returns the original matrix.

Identity matrix example 1

Multiplying a matrix by its Inverse Matrix will return the identity matrix.

When we multiply the Identity Matrix by another Identity Matrix, the result is the same matrix.

All the rows and columns in the Identity Matrix have Linear Independence.

Dye et al. (2018)

References

David Dye, Sam Cooper, and Freddie Page. Mathematics for Machine Learning: Linear Algebra - Home. 2018. URL: https://www.coursera.org/learn/linear-algebra-machine-learning/home/welcome.