TITLE: Inverse of matrix with nonnegative entries
QUESTION [5 upvotes]: I am interested in matrices with the property that both $A$ and $A^{-1}$ have nonnegative entries.  The only such matrices I could construct were diagonal matrices, and my question is whether these are the only such examples.
What I can say about such matrices is that they must preserve the quadrant
$$
Q^+ = \{x\in\mathbb{R}^n \mid x_i \geq 0 \}.
$$
That is, $x\in Q^+$ if and only if $Ax\in Q^+$.  This seems rather unlikely unless $A$ preserves the axes, that is, unless $A$ is diagonal.  But I can't seem to turn this into a proof.
EDIT
Cameron Buie made the nice observation that permutation matrices also work.
So I wonder: are there any examples with more than $n$ nonzero entries?  What about 2x2 examples with at least 3 nonzero entries?

REPLY [7 votes]: Of course, il maestro @Qiaochu Yuan is right; and, of course, he knows that there exists an elementary proof !
Let $A=[a_{p,q}],A^{-1}=[b_{p,q}]$. We consider the $i^{th}$ row of the matrix $A$ and we assume that there are $j\not= k$ s.t. $a_{i,j},a_{i,k}\not= 0$. Then $AA^{-1}=I$ implies that, for every $p\not= i$, $b_{j,p}=b_{k,p}=0$. Thus, the rows $j,k$ of $B$ are proportional and $B$ is not invertible, that is contradictory. Using $A^{-1}A=I$, we show the same result for the columns of $A$ and we are done.