Find the roots of quadratic polynomial and factor into linear factors I'm looking at Calculus by Adams, 7th Ed. page 43 Example 3b. It shows how to find the roots of $9x^2-6x+1$ by using the quadratic formula to arrive at the double root $\frac{1}{3}$. That I understand. 
However, I don't understand how the factoring (?) is carried out in the next line:
$9x^2-6x+1 = 9\left(x - \frac{1}{3}\right)^2 = (3x - 1)^2$
I thought the factor theorem says something along the lines of that if we have roots such as $\frac{1}{3}$, we can write the factors $(x - \frac{1}{3})(x - \frac{1}{3}) = \left(x - \frac{1}{3}\right)^2$. I don't get where the $9$ comes from after the first equal sign. Are they using a different method than completing the square?
 A: The factor theorem says only that $x-c$ is a factor of a polynomial $p(x)$ if and only if $p(c)=0$. What this exactly means is that there is a polynomial $q(x)$ such that $p(x) = (x-c)q(x)$. The theorem doesn't say, but it's required that $q(x)$ has degree one less than $p(x)$.
Applied to a quadratic polynomial such as your polynomial. We set $p(x) = 9x^2-6x+1$ has the only roots at $x=1/3$. This means that $x-1/3$ is a factor of it which means that is there's a polynomial $q(x)$ such that $p(x) = (x-1/3)q(x)$. Now $q(x)$ must be of degree $1$ that is on the form $q(x) = ax+b = a(x+b/a)$, we see from this that $x+b/a$ must be a factor of $p(x)$. So we know that by the factor theorem that $p(-b/a) = 0$ which we now requires $b/a$ to be $1/3$. We now know that:
$$9x^2-6x+1 = a(x+b/a)(x-1/3) = a(x-1/3)(x-1/3) = a(x-1/3)^2 = a\left(x^2-{2\over3}x + {1\over 9}\right)$$
With $a$ needing to be $9$ in order to the LHS and RHS to be equal. 
Another approach would be to complete the square (this is how the quadratic equation is solved without the formula), we know that $9x^2-6x = (3x-1)^2 -1$ (since $(3x-1)^2 = 9x^2-6x+1$, the $3x-1$ is chosen so that the $x^2$ and $x$ terms match). This means that
$$9x^2-6x+1 = (3x-1)^2-1 + 1 = (3x-1)^2$$
If you want to bring that into the other form you just rewrite the factors using $(3x-1) = 3(x-1/3)$
Note that one often shortcuts this reasoning. However you come to the conclusion you must of course end up with a factorization that is correct. You can just rely on that you by expanding $9(x-1/3)^2$ via the square rule come to the correct polynomial.
