T/F: If $A$ and $B$ are matrices such that AB=$I_n$, then $A$ and $B$ are square matrices. In my book (Linear Algebra by Steven Andrilli 4th ed.) There is a true/false question in the chapter 2 review that's all about "systems of linear equations." The question asks:
T/F: If $A$ and $B$ are matrices such that AB=$I_n$, then $A$ and $B$ are square matrices.
I said that this was true. The correct answer according to the book is False.
If $A$ is $m$x$n$ non-square matrix and $B$ is $n$x$p$ square matrix, then $A$*$B$ is an $m$x$p$ matrix. I don't understand how it can be square if $A$ or $B$ is non square.
 A: Consider the example, A=$\begin{matrix}\begin{pmatrix}1 & 0\end{pmatrix}\\\end{matrix}$ and B=$\begin{matrix}\begin{pmatrix}1 \\ 0\end{pmatrix}\\\end{matrix}$.
Then, $AB=1$, which is the (square) identity matrix $I_1$. However, $A$ and $B$ were not square. (Always best to think of the simplest counter examples :) )
Edit: You also asked,

If $A$ is $m \times n$ non-square matrix and $B$ is $n \times p$ square matrix, then $A*B$ is an $m \times p$ matrix. I don't understand how it can be square if $A$ or $B$ is non square.

As one comment also says above, $A$ and $B$ don't have to be square this way. For example, if $A$ is an $m \times n$ non-square matrix, and $B$ is an $n \times m$ matrix so also non-square, then $AB$ will be a $m \times m$ matrix. Therefore we get a square product out of non-square matrices.
A: The fact that $AB=I_n$ means that $A$ has $n$ rows, $B$ has $n$ columns and the number of columns of $A$ is the same as the number of rows of $B$, say $m$.
Also, $I_n$ is the matrix of an injective (resp. surjective) linear application, so $A$ (resp. $B$) is also the matrix of an injective (resp. surjective) of a linear apllication. This implies that $n \leqslant m$. I think we cannot say much more from the given condition.
The condition is however not enough to affirm that $A$ and $B$ must be square. Indeed, here is a counter-example:
$A=\begin{pmatrix}1 & 0 & 0\\ 0 & 1 & 0\end{pmatrix}$ and $B=\begin{pmatrix}1 & 0 \\ 0 & 1 \\ 0 & 0 \end{pmatrix}$, whose product is $I_2$.
