# Identity Matrix

An identity matrix is a square matrix having 1s on the main diagonal, and 0s everywhere else.

For example, the $\text{2}×\text{2}$ and $\text{3}×\text{3}$ identity matrices are shown below.

$\left[\begin{array}{cc}1& 0\\ 0& 1\end{array}\right]$

$\left[\begin{array}{ccc}1& 0& 0\\ 0& 1& 0\\ 0& 0& 1\end{array}\right]$

These are called identity matrices because, when you multiply them with a compatible matrix , you get back the same matrix.

Example:

$\left[\begin{array}{cc}1& 0\\ 0& 1\end{array}\right]\cdot \left[\begin{array}{rr}\hfill 4& \hfill 7\\ \hfill -1& \hfill 3\end{array}\right]=\left[\begin{array}{cc}1\left(4\right)+0\left(-1\right)& 1\left(7\right)+0\left(3\right)\\ 0\left(4\right)+1\left(-1\right)& 0\left(7\right)+1\left(3\right)\end{array}\right]$

$=\left[\begin{array}{rr}\hfill 4& \hfill 7\\ \hfill -1& \hfill 3\end{array}\right]$