# Inverse of matrix, LU Decomp, A^-1 = U^-1 L^-1 Not true for all cases?

I have Matrix A

A=       A^-1=
1 2 0   -1  2 0
1 1 0    1 -1 0
0 0 1    0  0 1


Which forms the upper and lower matrices

U=       U^-1=
1 2 0    1 -2 0
0 1 0    0  1 0
0 0 1    0  0 1

L=       L^-1 =
1 0 0    1 0 0
1 1 0   -1 1 0
0 0 1    0 0 1


Usually

A^-1 = U^=1 * L^-1


But when I multiply U^-1 * L^-1 I get

 3 -2 0
-1  1 0
0  0 1


Which != A^-1

Is there a special case that L U Factorization is not true for all Matrices?

The matrix $U$ should be $\begin{bmatrix}1 & 2 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1\end{bmatrix}$. The entry in the middle of $U$ should be $-1$ so that $A=LU$. Then since $L$ and $U$ are triangular and have nonzero diagonal, they are invertible, and $A^{-1}=U^{-1}L^{-1}$
The LU-factorisation of a matrix $A$ is a decomposition $A = L\cdot U$ such that $L$ is lower triangular and $U$ is upper triangular. This is not the case here for your $L$ and $U$, for example, the middle coefficient of $L \cdot U$ would be 3 and not 1.