TITLE: A matrix to the power of zero gives identity matrix even if it doesn't have an inverse?
QUESTION [18 upvotes]: If one matrix whose determinant is equal to 0 which means it doesn't have an inverse. Then how is possible to find the value of the matrix to the power of 0 equal to identity matrix when multiplying the original matrix with something undefined?
Is it a math fluke, or I am missing some important information?

REPLY [13 votes]: This is a good question.
The reason we define $A^0 = I$ is so that the identity 
$$
A^{m+n} = A^mA^n
$$
holds whenever $m$ and $n$ are nonnegative integers. 
Then we can evaluate $p(A)$ for any polynomial $p$, and sometimes even compute with power series to get things like $e^A$.
This all makes sense and is often useful whether or not $A$ is invertible. When it is, we extend the definition so that $A^{-n} = (A^{-1})^n$.