# Why can't you divide matrices?

I was just wondering that because one can multiply and add and subtract matrices, why can't one divide them?

• But you can.${}$ – Git Gud Dec 9 '13 at 2:22
• please explain. – Joao Dec 9 '13 at 2:23
• please link to a site. – Joao Dec 9 '13 at 2:25
• Google 'polynomial matrix' and 'polynomial matrix division'. And regarding scalar matrices, you can just look at division as multiplying by the inverse (because that's exactly what any divison is), that's why aschepler said 'sometimes you can', as not all matrices are invertible. – Git Gud Dec 9 '13 at 2:27
• I've reopened this question because I think it is a reasonable mathematical question and that the answers add value to the site. The reason given for closure (missing context or other details) doesn't seem applicable to me, since I'm not sure what additional context or details are appropriate or necessary. – Alex Becker Dec 11 '13 at 2:24

You sort of can. If a matrix $A$ is invertible, then there exists a matrix $A^{-1}$ such that $AA^{-1}=A^{-1}A=I$, where $I$ is the identity matrix. This is analogous to $a^{-1}=\frac1a$ for a nonzero real number, which satisfies $aa^{-1}=a^{-1}a=1$. Recall that dividing a real number $b$ by $a$ is the same as multiplying it by $a^{-1}$, i.e. $b/a=ba^{-1}$. Similarly, for matrices we can define "$B$ dividied by $A$" as $BA^{-1}$.

However, there are a few problems that arise:

1. Not all nonzero matrices are invertible. This is because the set of matrices, unlike real numbers, has zero divisors: there are nonzero matrices $A,B$ such that $AB=0$. If you could divide $B$ by $A$, you would get $B=0/A=0$, a contradiction.

2. Matrices do not commute, i.e. generally $AB\ne BA$. This means we have to make a distinction between dividing on the left ($A^{-1}B$) and dividing on the right ($BA^{-1}$), while for real numbers these are the same.

You CAN divide by matrices. To understand what division in the context of matrices mean, let us look at what division means in the context of real numbers.

$b/a$ in the context of real numbers denote the real number $x$ satisfying $x \cdot a=b$. Since multiplying two real numbers is commutative, the same real number $x$ also satisfies $a \cdot x = b$.

Similarly, in the context of matrices, $B/A$ means the matrix $X$ such that $X \cdot A = B$. However, in matrix algebra, multiplication is not commutative. Hence, in general, it is not true that $X \cdot A = A \cdot X$. Hence, you need to specify, whether you are dividing by a matrix on the right or on the left. Hence, if you are looking for a matrix $X$ such that $A \cdot X = B$, $X$ is denoted as $X = A\backslash B$.

$X = B/A$ means you are dividing by the matrix $A$ on the right and $X = A\backslash B$ means you are dividing by the matrix $A$ on the left.

Also, just like division by zero is not possible in the context of real numbers, you cannot divide by certain matrices, which are called singular matrices. Hence, the left division ($A\backslash B$) and right division ($B/A$) make sense only when $A$ is not singular.

Dividing by $x$ is undoing multiplication by $x$ via multiplication with $x$'s inverse. Further, with nonzero numbers, there is a unique way to do this.

With matrices, a lot of this breaks down. For some matrices $X$, there is no way to undo multiplication by $X$ via multiplication with a would-be $X^{-1}$ matrix, because multiplication by $X$ has destroyed too much of the original information.

Even when there is way to undo multiplication by $X$, there can be multiple would-be $X^{-1}$ matrices that do it.

For some matrices, an inverse matrix both exists and is unique, and only for those matrices is it OK to do division in the way you are trying to do it. In a linear algebra class you will learn that these matrices are the square matrices with determinant not equal to $0$.

Sometimes you can, sometimes you can't. For square nonsingular matrices, you can multiply by the inverse of a matrix in order to get the identity. For singular matrices, inverses do not exist.

The underlying reason is that although a matrix is analogous to a number, it is more analogous to (a parallel operation on) an array of several numbers, and the operation could be zero on one of the components. For example, a diagonal matrix can have on the main diagonal both some $0$'s and some non-zero elements, the zero elements prevent it from having an inverse, and are the only thing that can stop an inverse from existing. The explanation in the general case is essentially the same, by diagonalizing the matrix or slight modifications of that.