What is reusable code? Is it a template to base projects on or single piece of code used in multiple programs? Microsoft seems confused.
Like the scalar inverse, the inverse of a matrix has the property:

(6)
where I is the unit matrix of appropriate size.
That term "appropriate size" is important. Now, take another look at Equation 6. The unit matrix is, by definition, square. What's more, the operations XX-1and X-1X only make sense if the inner indices are equal. That is, the matrix X must also be square. Otherwise it cannot have an inverse.
The rule of equal dimensions also limits how we can use the inverse. While the inverse matrix must be square, the matrix it multiplies need not be. Unlike the case in Equation 3, we can only multiply the inverse in the way that makes sense, dimensionally. Consider the classic matrix form of the linear algebra problem:

(7)
We know that A is square (else the system has no solution). Let's say that it's n×n. Then x and y must both be column vectors, dimensioned n×1. In that case, the product yA-1 makes no sense at all--the dimensions don't line up. The solution only makes sense if we write:

(8)
Mathematically, matrices are not commutative. You can't just switch the order of multiplication, as you can with scalars.
But wait, there's more. Eagle eyes will have seen a gotcha in Equation 3. If the value of x is zero, its inverse doesn't exist--or, rather, is a mathematical infinity. The same is true of the matrix inverse, only more so. Surely the inverse of a matrix like:

(9)
cannot exist; there is no matrix we can multiply 0 by to get the unit matrix I. But for matrices, 0 is not by any means the only matrix whose inverse doesn't exist.
But if a normal-looking matrix can fail to have an inverse, how can we tell? What can be the rule by which we identify it? To see the answer, you need only think back to the kinds of linear algebra problems that led us to matrices in the first place. If I have some set of linear equations like:

(10)
I can only solve for x and y if the two equations are linearly independent. That is, they can't just be scaled versions of each other. When, in high school, we used to say "n equations in n unknowns," what we really meant was "n independent equations . . . ."
So how can we be sure that the equations are really independent? The answer turns out to be: the determinant of the coefficient matrix is non-zero. A matrix whose determinant is zero is called singular, and a singular matrix has no inverse.
And how, you ask, can I calculate the determinant? Ah, that's the question, and it's one I won't answer directly, since the definition is horrible. The determinants of small matrices are, however, easy to write down:

(11)