Jorge Valle

Jorge Valle

Jorge Valle is a front end developer with a particular passion for, and expertise in, JavaScript and user interfaces. Lately, he's also been diving into machine learning.

What is an identity matrix?

The identity matrix is a matrix with ones on the leading diagonal, and zeros everywhere else. It's commonly denoted by the letter I if the size is evident from the context.

$$ I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} $$
Figure 1: An identity matrix.

It can also be denoted by In to refer more specifically to an $n$ by $n$ identity matrix.

$$ I_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \\ I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} $$
Figure 2: More identity matrices.

It's significant in linear algebra because any matrix multiplied by its identity matrix results in the same as the original.

$$ \begin{bmatrix} 5 & 18 \\ 7 & 22 \end{bmatrix} \cdot \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 5 & 18 \\ 7 & 22 \end{bmatrix} $$
Figure 3: A use for the identity matrix.

Numpy

Implementing in Numpy is trivial and easy to remember.


Books, patrons and coffee in Caffè San Marco, Trieste