My understanding is that by definition, the 0-th power of any square matrix is the identity matrix. This is what the mathworld entry for matrix powers and answers to a math.SE question assert.
Yet when I ask Mathematica to compute the 0-th power of a singular matrix,
MatrixPower[{{1, 1}, {1, 1}}, 0]
I get the following error message and the unevaluated input back out.
MatrixPower::sing: Matrix {{1,1},{1,1}} is singular.
Obviously I can fix this by unprotecting MatrixPower and defining:
Unprotect[MatrixPower]
MatrixPower[m_?SquareMatrixQ, 0] := IdentityMatrix[Length[m]]
Protect[MatrixPower]
But I'd like to understand this properly. Is there some reason that a non-singular matrix might be thought not to have a 0-th power? Can someone explain what is going on?
MatrixPower[m_?SquareMatrixQ, 0]:= ...
$\endgroup$