Let the square matrix $P$ be idempotent, meaning that $P^2=P$. (a) Prove that $\mathbf{w} \in \operatorname{img} P$ if and only if $P \mathbf{w}=\mathbf{w}$. (b) Show that img $P$ and $\operatorname{ker} P$ are complementary subspaces, as defined in Exercise 2.2.24, so every $\mathbf{v} \in \mathbb{R}^n$ can be uniquely written as $\mathbf{v}=\mathbf{w}+\mathbf{z}$ where $\mathbf{w} \in \operatorname{img} P, \mathbf{z} \in \operatorname{ker} P$.