# Natural numbers of inverted matrix

My question is bit more mathematical then algorithmic.

Let's say I have 4x4 natural numbers matrix (including 0), is there any inverted matrix which also contains only natural numbers to it?

Thanks for any help give. Shahar

-

## migrated from mathematica.stackexchange.comJul 27 '12 at 12:12

This question came from our site for users of Mathematica.

You could try on math.stackexchange. –  assylias Jul 27 '12 at 11:47
Most natural number matrices either are not invertible or have an inverse containing negative numbers or fractions. The identity matrix however contains only natural numbers and zeros, and so does its inverse ;-). –  Don Roby Jul 27 '12 at 11:49

Let us first consider the case of integer matrices. A square integer matrix A has an inverse with rational entries if and only if det(A) != 0. The entries of the inverse are all integers if and only if the determinant det(A) == ±1.
Now, for matrices with natural numbers as entries, each product (entry of A)*(entry of B) is a natural number and the entries of the product are sums of natural numbers. So they can be 0 only if all of the contributing products of entries are 0, and 1 only if all the contributing products of entries but one are zero, and the nonzero product is 1.