UNIT matrix function
Description
UNIT(A) returns a unit matrix (identity matrix) with the same dimensions of the square matrix A.
UNIT(n) returns a square unit or identity n × n matrix.
The square n × n identity matrix, denoted In, is a matrix with 1's on the diagonal and 0's elsewhere.
When matrix A is
$$ A=\begin{bmatrix}
5&2 \\
2&7
\end{bmatrix} $$
5&2 \\
2&7
\end{bmatrix} $$
then
$$ UNIT(A)=\begin{bmatrix}
1&0\\
0&1
\end{bmatrix} $$
1&0\\
0&1
\end{bmatrix} $$
In multiplication, an identity element is a neutral element. The identity matrix plays the same role as the number 1 in ordinary arithmetic:
$$ \begin{bmatrix}
5&2 \\
2&7
\end{bmatrix} \begin{bmatrix}
1&0\\
0&1
\end{bmatrix} = \begin{bmatrix}
5&2 \\
2&7
\end{bmatrix} $$
5&2 \\
2&7
\end{bmatrix} \begin{bmatrix}
1&0\\
0&1
\end{bmatrix} = \begin{bmatrix}
5&2 \\
2&7
\end{bmatrix} $$