<s>[INST] finding solutions by factoring How would you find the integer solutions to $a^2-b^2=16$?
I know that the factors of $16$ are $8*2,$ $4*4,$ and $16*1.$ How would I use this? 
I know that $a^2-b^2=(a+b)(a-b)=16,$ but how would you find to the solutions to it? I know that you can plug in numbers to find the answers, but is there another way of doing this?
 [/INST] We wish to find integer solutions for $a$ and $b$ such that $a^2-b^2=16$.
Factoring the expression we obtain $(a+b)(a-b)=16$.
This means that $(a+b)|16$ and $(a-b)|16$.
From this we can find a set $(a+b)\in \{-16,-8,-4,-2,-1,1,2,4,8,16\}$.
So we obtain the equations 
$a+b=-16 \implies a-b=-1$
$a+b=-8 \implies a-b=-2$
$a+b=-4 \implies a-b =-4$
$a+b =-2 \implies a-b =-8$
$a+b = -1 \implies a-b=-16$
$a+b= 1 \implies a-b=16$
$a+b=2 \implies a-b = 8$
$a+b=4 \implies a-b = 4$
$a+b=8 \implies a-b = 2$
$a+b=16 \implies a-b=1$
Now for each of these there is a corresponding matrix (e.g. the first set of equations has been done below:
\begin{align*}
\left(\begin{array}{cc|c}
1 & 1 &-16\\
1 & -1 &-1\\
\end{array}\right)\end{align*}
Which we may factor into row echelon form
\begin{align*}
\left(\begin{array}{cc|c}
1 & 1 &-16\\
0 & -2 & 15\\
\end{array}\right)\end{align*}
To get the solution of $b=-7.5$ and $a=-8.5$.
This is not an integer solution so we may discard it. Now continue this process for the remaining 9 pairs of equations.
</s>