Find the matrix $\mathbf{A}$ if $A\binom{7}{-1} = \binom{6}{2}.$ Find the $2\times2$ matrix $A$ where $A^2=A$ and
$$A\begin{pmatrix} 7 \\ -1 \end{pmatrix} = \begin{pmatrix} 6 \\ 2 \end{pmatrix}.$$
I tried plugging in: $A= \begin{pmatrix}a&b\\c&d\end{pmatrix}$ but that became messy very quickly. I got the equations:
$7a-b = 6$
$7c-d = 2$
$a^2+bc = a$
$ab+bd = b$
$ac + cd = c$
$bc + d^2 = d$ from trying that method. What should I do? 
 A: As $A^2=A$, you also know that $A\begin{pmatrix}6\\2\end{pmatrix}=\begin{pmatrix}6\\2\end{pmatrix}$. Since $\begin{pmatrix}7\\-1\end{pmatrix},\begin{pmatrix}6\\2\end{pmatrix}$ are linearly independant, this determines $A$ completely. We conclude that both columns of $A$ are multiples of $\begin{pmatrix}6\\2\end{pmatrix}$, so
$$ A=\begin{pmatrix}6x&6y\\2x&2y\end{pmatrix}$$
for certain $x,y$. Now $A\begin{pmatrix}6\\2\end{pmatrix}=\begin{pmatrix}6\\2\end{pmatrix}$ just means that $6x+2y=1$, and $A\begin{pmatrix}7\\-1\end{pmatrix}=\begin{pmatrix}6\\2\end{pmatrix}$ means that $7x-y=1$. Can you find $x,y$ now?
A: Hint: Since you have $7a-b=6$ and $7c-d=2$ then $b=7a-6$ and $d=7c-2.$ Moreover, $A^2=A$ then $\det(A)^2=\det(A)$ which implies $\det(A)=0$ or $\det(A)=1$ then $ad=bc$ or $ad-bc=1.$ If $ad=bc$ then you get $a(7c-2)=c(7a-6)$ then  $-2a=-6c$ so  the coefficients of the matrix $A$ are of the form $a=3c,$ $b=7a-6=21c-6 $ and $d=7c-2.$ If $ad-bc=1$ then $-2a+6c=1$ so  the coefficients of the matrix $A$ are of the form $c=\frac{2a+1}{6}$ $b=7a-6$ and $d=7c-2=\frac{14a-5}{6}.$  
A: Since
$A^2= A, \tag{1}$
we have
$A(I - A) = (I - A)A = A - A^2 = 0, \tag{2}$
whence, for any vector $x$,
$A(I - A)x = (I - A)Ax = 0. \tag{3}$
(3) indicates that vectors $Ax \ne 0$  in the image of $A$ are in the kernel of $I - A$, i.e., are eigenvectors of $A$ with eigenvalue $1$, and likewise that vectors $0 \ne (I - A)x \in \text{Im}(I - A)$ are eigenvectors corresponding to eigenvalue $0$.  
Since we are given that
$A \begin{pmatrix} 7 \\ -1 \end{pmatrix} = \begin{pmatrix} 6 \\ 2 \end{pmatrix}, \tag{4}$
we find via the above remarks that
$A \begin{pmatrix} 6 \\ 2 \end{pmatrix} = \begin{pmatrix} 6 \\ 2 \end{pmatrix}; \tag{5}$
also, using (4),
$(I - A) \begin{pmatrix} 7 \\ -1 \end{pmatrix} = \begin{pmatrix} 7 \\ -1 \end{pmatrix} - \begin{pmatrix} 6 \\  2 \end{pmatrix} = \begin{pmatrix} 1 \\ -3 \end{pmatrix}; \tag{5}$
we thus also conclude that
$A \begin{pmatrix} 1 \\ -3 \end{pmatrix} = 0. \tag{6}$
We note that the vectors $(6, 2)^T$, $(1, -3)^T$ are linearly independent, being eigenvectors of different eigenvalues; this may also be seen by evaluating the determinant
$\det(\begin{pmatrix} 6 & 1 \\ 2 & -3 \end{pmatrix}) = 6 \cdot -3 - 1 \cdot 2 = -20 \ne 0. \tag{7}$
Being linearly independent, $(6, 2)^T$ and $(1, -3)^T$ form a basis; knowing the action of $A$ on a basis allows the computation of $a, b, c, d$ to proceed; from (6),
$a - 3b = 0, \tag{8}$
$c - 3d = 0; \tag{9}$
so,
$b = \dfrac{a}{3}; d = \dfrac{c}{3}; \tag{10}$
from (5),
$6a + 2b = 6, \tag{11}$
$6c + 2d = 2; \tag{12}$
combining (10)-(12):
$\dfrac{20}{3} a = 6; \dfrac{20}{3} c = 2, \tag{13}$
or
$a = \dfrac{18}{20} = \dfrac{9}{10}; c = \dfrac{6}{20} = \dfrac{3}{10}; \tag{14}$
now from (10),
$b = \dfrac{3}{10}; d = \dfrac{1}{10}, \tag{15}$
so we finally see that
$A = \begin{bmatrix} \dfrac{9}{10} & \dfrac{3}{10} \\ \dfrac{3}{10} & \dfrac{1}{10} \end{bmatrix}. \tag{16}$
It is easily checked that (4), (5), and (6) all bind, and that $A^2 = A$.
A: Write out the equations and use a simple linear solver to find:
${1 \over 10}\left(
\begin{array}{cc}
 9 & 3 \\
 3 & 1 \\
\end{array}
\right)
$
