# How can a dot produt of two non square matrix result in the identity matrix?

Suppose we have $A^{m*n}$ and $B^{n*m}$ matrices. What constraints has to be satisfied by $A$ and $B$ so that the product of these result in the identity matrix $I$. I fund that it is possible but I cannot find the constraints for $A$ and $B$ which I really need. Thanks for the help.

• The constraints should, probably, be black magic or something like that: the dot or inner product of two vectors in a linear space with inner product gives us a scalar, not another vector. Perhaps you meant simply product? – DonAntonio May 16 '17 at 9:47
• Yes sorry you are right – DalekSupreme May 16 '17 at 9:50

I suppose by dot product you mean usual matrix product.

So if $$AB=I_m$$ then $B$ is called the right inverse of $A$ and $A$ is the left inverse of $B$.

If $$BA=I_n$$ then $A$ is the right inverse of $B$ and $B$ is the left inverse of $A$.

A matrix has right inverse iff its columns are independent.

A matrix has left inverse iff its rows are independent.

However, a non-square cannot have both left and right inverse.

• Thanks! Just what I needed :) – DalekSupreme May 16 '17 at 9:55

Too big for a comment, but for a pair of $2\times 3$ and $3\times 2$ matrices we get $$\left(\begin{array}{lll}a&b&c \\ d&e&f \end{array}\right)\left(\begin{array}{ll}g&h\\i&j\\k&l\end{array}\right)=\left(\begin{array}{ll}1&0\\0&1\end{array}\right).$$ This implies $$ag+bi+ck=1\\dg+ei+fk=0\\ah+bj+cl=0\\dh+ej+fl=1.$$ So these are the constraints, which you can adapt to any sized matrices.