# Idempotent matrix, with rows forming a basis

I'm taking an introductory class on linear algebra, we don't know anything about rank, kernel, or determinants yet.

I'm asked to show that if $A^2=A$ for a matrix $A$ with elements in a field $F$, and if the rows of $A$ form a basis for the space $F^n$, then $A=I_n$.

My proof went something like this: We cannot have A be the zero matrix, since that wouldn't form a basis with its rows for $F^n$. Now assume that $A\neq I_n$. This implies that $A^2 \neq A$. This is a contradiction, therefore we must have $A=I_n$.

What's wrong with my argument? I don't understand why I can't reason with the inequalities this way. It works in a field like $\mathbb{R}$, why not here? I also know it must be wrong, since there are an infinite number of matrices with this property, but I can only find 0 and "1".

• There are matrices different from the identity which are equal to their own square. I suggest you look for some examples — 2x2, using only zeros and ones. – Mariano Suárez-Álvarez Feb 6 '18 at 2:44
• You must have seen something in your class. It would be a good idea if you told us what — for I doubt this can be done using onky the definion of matrix products.... – Mariano Suárez-Álvarez Feb 6 '18 at 2:46
• We have seen matrix products, very simple linear transformations, span, and vector spaces. – user7240099 Feb 6 '18 at 3:23

## 3 Answers

An important comment first: if $A\ne I$ you can't assert that $A^2\ne A$. Try with $$A=\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$$ Thus, unfortunately, your attempt is not good.

Suppose $x$ is a row vector and let $a_1,a_2,\dots,a_n$ be the rows of $A$. Then $$x=\sum_{i=1}^n \alpha_i a_i$$ for a unique choice of the scalars $\alpha_1,\dots,\alpha_n$, which amounts to saying that $$x=[\alpha_1\ \alpha_2\ \dots\ \alpha_n]A$$ that is, $x=yA$ for a unique row vector $y$. Then $$x=yA=yA^2=(yA)A=xA$$ Hence $yA=xA$ and the uniqueness of $y$ yields $x=y$. Hence $x=xA$ for every row vector $x$.

Can you finish?

• Sorry, at the end did you mean for every row vector x, as A is a matrix? – user7240099 Feb 6 '18 at 17:11
• @user7240099 Yes, sorry for the typo. – egreg Feb 6 '18 at 17:13

For any x $Ax-x$ is a linear combination of the rows of A so $Ax-x=\sum a_i Ae_i$. Apply A on both sides to get $0=A^{2} x-Ax= A(Ax-x)=\sum a_i A^{2} e_i =\sum a_i Ae_i=Ax-x$. hence $Ax=x$ for all x.

If the rows of $A$ form a basis for the space then the matrix is invertible i.e. exists $A^{-1}$ such that $AA^{-1}=I$.
Then $A^2=A$ leads to $AAA^{-1}=AA^{-1}$ and $A=I$.