# Intro to identity matrices

Learn what an identity matrix is and about its role in matrix multiplication.

#### What you should be familiar with before taking this lesson

A matrix is a rectangular arrangement of numbers into rows and columns.
The dimensions of a matrix tell the number of rows and columns of the matrix in that order. Since matrix A has 2 rows and 3 columns, it is called a 2, times, 3 matrix.
If this is new to you, we recommend that you check out our intro to matrices.
In matrix multiplication, each entry in the product matrix is the dot product of a row in the first matrix and and a column in the second matrix.
If this is new to you, we recommend that you check out our matrix multiplication article.

## Definition of identity matrix

The n, times, n identity matrix, denoted I, start subscript, n, end subscript, is a matrix with n rows and n columns. The entries on the diagonal from the upper left to the bottom right are all 1's, and all other entries are 0.
For example:
$I_2=\left[\begin{array}{rr}{\greenD1} &0 \\ 0& \greenD1 \end{array}\right]\quad I_3=\left[\begin{array}{rr}{\greenD1} &0 &0 \\ 0& \greenD1&0\\0&0&\greenD1 \end{array}\right]\quad I_4=\left[\begin{array}{rr}{\greenD1} &0 &0&0 \\ 0& \greenD1&0&0\\0&0&\greenD1&0\\0&0&0&\greenD1 \end{array}\right]$
The identity matrix plays a similar role in operations with matrices as the number 1 plays in operations with real numbers. Let's take a look.

## Investigation: Multiplying by the identity matrix

Try a few multiplication problems involving the appropriate identity matrix.
1) $I_2=\left[\begin{array}{rr}{1} &0 \\ 0& 1 \end{array}\right]$ and $A=\left[\begin{array}{rr}{2} &3 \\ 5& 1 \end{array}\right]$.
I, start subscript, 2, end subscript, dot, A, equals

Let's label the rows of matrix I, start subscript, 2, end subscript and the columns of matrix A so that it is easier to express I, start subscript, 2, end subscript, dot, A.
We can find I, start subscript, 2, end subscript, dot, A as follows:
\begin{aligned}I_2\cdot A&=\left[\begin{array}{rr}\vec{i_1}\cdot \vec{a_1} & \vec{i_1}\cdot \vec{a_2} \\ \vec{i_2}\cdot \vec{a_1} & \vec{i_2}\cdot \vec{a_2} \end{array}\right]\\ \\\\ &=\left[\begin{array}{rr}{1\cdot 2+0\cdot 5} & 1\cdot 3+0\cdot 1 \\ 0\cdot 2+1\cdot 5& 0\cdot 3+1\cdot 1\end{array}\right]\\ \\\\ &=\left[\begin{array}{rr}{2} &3 \\ 5& 1 \end{array}\right] \end{aligned}
2) $I_3=\left[\begin{array}{rr}{1} &0&0 \\ 0& 1&0 \\0&0&1 \end{array}\right]$ and $A=\left[\begin{array}{rr}{1} &5&4 \\ 3& 2&2 \\4&1&3 \end{array}\right]$.
A, dot, I, start subscript, 3, end subscript, equals

Let's label the rows of matrix A and the columns of matrix I, start subscript, 3, end subscript so that it is easier to express A, dot, I, start subscript, 3, end subscript.
We can find A, dot, I, start subscript, 3, end subscript as follows:
\begin{aligned}A\cdot I_3&=\left[\begin{array}{rr}\vec{a_1}\cdot \vec{i_1} & \vec{a_1}\cdot \vec{i_2}&\vec{a_1}\cdot \vec{i_3} \\ \vec{a_2}\cdot \vec{i_1} & \vec{a_2}\cdot \vec{i_2} & \vec{a_2}\cdot \vec{i_3} \\ \vec{a_3}\cdot \vec{i_1} & \vec{a_3}\cdot \vec{i_2} & \vec{a_3}\cdot \vec{i_3} \end{array}\right]\\ \\\\ &=\left[\begin{array}{rr}{1\cdot 1+5\cdot 0+4\cdot 0} & 1\cdot 0+5\cdot 1+4\cdot 0& 1\cdot 0+5\cdot 0+4\cdot 1\\ 3\cdot 1+2\cdot 0+2\cdot 0& 3\cdot 0+2\cdot 1+2\cdot 0&3\cdot 0+2\cdot 0+2\cdot1 \\4\cdot 1+1\cdot0+3\cdot 0 &4\cdot 0+1\cdot 1+3\cdot0&4\cdot0+1\cdot0+3\cdot1 \end{array}\right]\\ \\\\ &=\left[\begin{array}{rr}{1} &5&4 \\ 3& 2&2\\ 4&1&3 \end{array}\right] \end{aligned}

### The conclusion

The product of any matrix and the appropriate identity matrix is always the original matrix, regardless of the order in which the multiplication was performed! In other words, A, dot, I, equals, I, dot, A, equals, A.

## Connections to the real numbers

### Multiplicative Identities

The identity matrix I plays a similar role to what the number 1 plays in the real number system.
The number 1The identity matrix I
The product of 1 and any number a is a. left parenthesis, a, dot, 1, equals, 1, dot, a, equals, a, right parenthesisThe product of a matrix A and the appropriate identity matrix I is A. left parenthesis, A, dot, I, equals, I, dot, A, equals, A, right parenthesis

### Multiplicative Inverses

Two real numbers whose product is the multiplicative identity are called multiplicative inverses. For example, the numbers start fraction, 1, divided by, 3, end fraction and 3 are multiplicative inverses because start fraction, 1, divided by, 3, end fraction, dot, 3, equals, 1 and 3, dot, start fraction, 1, divided by, 3, end fraction, equals, 1.
In fact, all nonzero real numbers have multiplicative inverses. But does this connection hold with matrix operations?
Consider matrices A and B.
$A=\left[\begin{array}{rr}{2} &3 \\ 3& 4 \end{array}\right]$ space $B=\left[\begin{array}{rr}{-4} &3 \\ 3& -2 \end{array}\right]$
We can multiply to see that A, B, equals, I, start subscript, 2, end subscript and B, A, equals, I, start subscript, 2, end subscript.
Let's label the rows of matrix A and the columns of matrix B so that it is easier to express A, B.
We can find A, B as follows:
\begin{aligned}A B&=\left[\begin{array}{rr}\vec{a_1}\cdot \vec{b_1} & \vec{a_1}\cdot \vec{b_2} \\ \vec{a_2}\cdot \vec{b_1} & \vec{a_2}\cdot \vec{b_2} \end{array}\right]\\ \\\\ &=\left[\begin{array}{rr}{2\cdot (-4)+3\cdot 3} &2\cdot 3+3\cdot (-2) \\ 3\cdot (-4)+4\cdot 3& 3\cdot 3+4\cdot (-2)\end{array}\right]\\ \\\\ &=\left[\begin{array}{rr}{1} &0 \\ 0& 1 \end{array}\right] \end{aligned}
To find B, A, be sure to switch the order of the matrices. Because of this, we must re-label the rows and columns of the matrices.
We can find B, A as follows:
\begin{aligned}B A&=\left[\begin{array}{rr}\vec{b_1}\cdot \vec{a_1} & \vec{b_1}\cdot \vec{a_2} \\ \vec{b_2}\cdot \vec{a_1} & \vec{b_2}\cdot \vec{a_2} \end{array}\right]\\ \\\\ &=\left[\begin{array}{rr}{(-4)\cdot 2+3\cdot 3} &-4\cdot 3+3\cdot 4 \\ 3\cdot 2+(-2)\cdot 3& 3\cdot 3+(-2)\cdot 4\end{array}\right]\\ \\\\ &=\left[\begin{array}{rr}{1} &0 \\ 0& 1 \end{array}\right] \end{aligned}
This means that A and B are multiplicative inverses.
However, as we will see, not all matrices have multiplicative inverses. This is one place where the properties of real numbers differ from the properties of matrices!