How to factor $16x^2-y^2+8y-16$ so I get $(4x+y-4)(4x-y+4)$? I tried completing the square, making it equal to zero, and trying to think of it as a circle, but I still can't prove that these two are equivalent. I tried to factor this in Wolfram Alpha, and it spits out that answer. But I don't know how else to get to it.
 A: We have that
$$16x^2-y^2+8y-16 =16x^2-(y^2-8y+16)=(4x)^2-(y-4)^2$$
then recall that
$$A^2-B^2=(A+B)(A-B)$$
A: I f you want to be systematic, add in a variable $z$ to make this homogeneous,
$$ 16 x^2 - y^2 - 16 z^2 + 8 y  z  $$
with result (below)
$$ 16 x^2 - y^2 - 16 z^2 + 8 y  z = 16 x^2 - (y-4z)^2 = (4x+y-4z)(4x-y+4z)  $$
Algorithm discussed at http://math.stackexchange.com/questions/1388421/reference-for-linear-algebra-books-that-teach-reverse-hermite-method-for-symmetr
https://en.wikipedia.org/wiki/Sylvester%27s_law_of_inertia
$$ H = \left( 
\begin{array}{rrr} 
16 & 0 & 0 \\ 
0 &  - 1 & 4 \\ 
0 & 4 &  - 16 \\ 
\end{array}
\right) 
$$
$$  D_0 = H  $$
$$ E_j^T D_{j-1} E_j = D_j  $$
$$  P_{j-1} E_j = P_j  $$
$$ E_j^{-1} Q_{j-1}  = Q_j  $$
$$  P_j Q_j = Q_j P_j = I  $$
$$ P_j^T H P_j = D_j  $$
$$ Q_j^T D_j Q_j = H  $$
$$ H = \left( 
\begin{array}{rrr} 
16 & 0 & 0 \\ 
0 &  - 1 & 4 \\ 
0 & 4 &  - 16 \\ 
\end{array}
\right) 
$$
==============================================
$$ E_{1} = \left( 
\begin{array}{rrr} 
1 & 0 & 0 \\ 
0 & 1 & 4 \\ 
0 & 0 & 1 \\ 
\end{array}
\right) 
$$
$$  P_{1} = \left( 
\begin{array}{rrr} 
1 & 0 & 0 \\ 
0 & 1 & 4 \\ 
0 & 0 & 1 \\ 
\end{array}
\right) 
, \; \; \; Q_{1} = \left( 
\begin{array}{rrr} 
1 & 0 & 0 \\ 
0 & 1 &  - 4 \\ 
0 & 0 & 1 \\ 
\end{array}
\right) 
, \; \; \; D_{1} = \left( 
\begin{array}{rrr} 
16 & 0 & 0 \\ 
0 &  - 1 & 0 \\ 
0 & 0 & 0 \\ 
\end{array}
\right) 
$$
==============================================
$$ P^T H P = D  $$
$$\left( 
\begin{array}{rrr} 
1 & 0 & 0 \\ 
0 & 1 & 0 \\ 
0 & 4 & 1 \\ 
\end{array}
\right) 
\left( 
\begin{array}{rrr} 
16 & 0 & 0 \\ 
0 &  - 1 & 4 \\ 
0 & 4 &  - 16 \\ 
\end{array}
\right) 
\left( 
\begin{array}{rrr} 
1 & 0 & 0 \\ 
0 & 1 & 4 \\ 
0 & 0 & 1 \\ 
\end{array}
\right) 
 = \left( 
\begin{array}{rrr} 
16 & 0 & 0 \\ 
0 &  - 1 & 0 \\ 
0 & 0 & 0 \\ 
\end{array}
\right) 
$$
$$ Q^T D Q = H  $$
$$\left( 
\begin{array}{rrr} 
1 & 0 & 0 \\ 
0 & 1 & 0 \\ 
0 &  - 4 & 1 \\ 
\end{array}
\right) 
\left( 
\begin{array}{rrr} 
16 & 0 & 0 \\ 
0 &  - 1 & 0 \\ 
0 & 0 & 0 \\ 
\end{array}
\right) 
\left( 
\begin{array}{rrr} 
1 & 0 & 0 \\ 
0 & 1 &  - 4 \\ 
0 & 0 & 1 \\ 
\end{array}
\right) 
 = \left( 
\begin{array}{rrr} 
16 & 0 & 0 \\ 
0 &  - 1 & 4 \\ 
0 & 4 &  - 16 \\ 
\end{array}
\right) 
$$
A: $$16x^2-y^2+8y-16=16x^2-(y-4)^2=(4x-(y-4))(4x+(y-4))$$
At the last step I used $a^2-b^2=(a-b)(a+b)$, in which $a= 4x$ and $b=y-4$.
