# How do you solve x^2-2x+1=0 by completing the square?

Sep 28, 2017

${\left(x - 1\right)}^{2} = 0$

#### Explanation:

${x}^{2} - 2 x + 1 = 0$

Let's start by subtracting $1$ from both sides so that the $x$ terms are isolated:

${x}^{2} - 2 x = - 1$

Now, let's compute ${\left(\frac{b}{2}\right)}^{2}$ and add it to both sides of the equation:

${\left(\frac{b}{2}\right)}^{2} = {\left(- \frac{2}{2}\right)}^{2} = 1$

${x}^{2} - 2 x + 1 = - 1 + 1$

Let's factorize the left hand side and simplify:

$\left(x - 1\right) \left(x - 1\right) = 0$

${\left(x - 1\right)}^{2} = 0$