<s>[INST] Factoring Quadratic equation I am trying to factor $9x^2-6x+1$ after finding the roots, I am using the following formula $a(x-x_1)(x-x_2)$ in this case there is just one root ($\frac{1}{3}$) 
How do I know that the answer is $(3x-1)^2$ and not just $(3x-1)$?
 [/INST] Using the quadratic formula for $ax^2+bx+c=0$ we get: $$x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}.$$ 
In your case we have $x_1=\frac{1}{3}$ and $x_2=\frac{1}{3}$, hence we can write $$9x^2-6x+1=9(x-x_1)(x-x_2)=9\left(x-\frac{1}{3}\right)\cdot\left(x-\frac{1}{3}\right)=9\left(x-\frac{1}{3}\right)^2.$$
</s>