# Matrices that can only be permutation matrices

How to prove that if $A$ and $B$ are two $n×n$ matrices with non negative integer entries such that $AB=I$.Then how to show $A$ and $B$ are permutation matrices.Permutation matrices are matrices with the columns just a permutation of the identity matrix. How do i proceed.Can somebody hint.

Hint : Which pairs of vectors with non-negative integers have scalar-product $0$ or $1$ ?
• Additional hint : Use $A^TB^T=(BA)^T=I^T=I$ and the row-sum-norm – Peter Feb 11 '17 at 18:36
• i can see that if any of the entries in $A$ is greater than $1$ then since the product with entries from B has to result in a $0$ or $1$ then that column of B has to be zero which contradicts the invertibility of B – Upstart Feb 11 '17 at 18:46
• Excellent. Now rule out that we have more than one $1$ in any column or row. Finally rule out a zero-row/zero-column (almost trivial) – Peter Feb 11 '17 at 18:48