Answer
$r^2-r+\frac{1}{4}=(r-\frac{1}{2})^2$
Work Step by Step
We add the square of half of the coefficent of $r$ so that the result is a perfect square trinomial.
Co-efficient of $r=-1$
Half of -1 is $\frac{1}{2}×-1=\frac{-1}{2}$
Square of $\frac{-1}{2}$ is $\frac{-1}{2}×\frac{-1}{2}=\frac{1}{4}$
We add $\frac{1}{4}$ to $r^2-r$ to make it a perfect square trinomial.
Hence it becomes $r^2-r+\frac{1}{4}$
Factored form-
$r^2-r+\frac{1}{4}$
$= r^2-\frac{1}{2}r-\frac{1}{2}r +\frac{1}{4} $
$=r(r-\frac{1}{2})-\frac{1}{2} (r-\frac{1}{2})$ (Taking the common factors)
$=(r-\frac{1}{2}) (r-\frac{1}{2})$ ($(r-\frac{1}{2})$ is taken common from both the terms)
$=(r-\frac{1}{2})^2$