The quadratic formula, first discovered by the Babylonians four thousand years ago, gives you a surefire way to solve quadratic equations of the form

$0=a{x}^{2}+bx+c$.

Plugging in the values of $a,b,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}\text{\hspace{0.17em}}c$, you will get the desired values of $x$.

$x=\frac{-b\text{\hspace{0.17em}}±\text{\hspace{0.17em}}\sqrt{{b}^{2}-4ac}}{2a}$

If the expression under the square root sign (${b}^{2}-4ac$, also called the discriminant) is negative, then there are no real solutions. (You need complex numbers to deal with this case properly. These are usually taught in Algebra $2$.)

If the discriminant is zero, there is only one solution. If the discriminant is positive, then the $±$ symbol means you get two answers.

Example 1:

${x}^{2}-x-12=0$

Here $a=1,b=-1,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}\text{\hspace{0.17em}}c=-12$. Substituting, we get:

$x=\frac{-\left(-1\right)\text{\hspace{0.17em}}±\text{\hspace{0.17em}}\sqrt{{\left(-1\right)}^{2}-4\left(1\right)\left(-12\right)}}{2\left(1\right)}$

Simplify.

$x=\frac{1\text{\hspace{0.17em}}±\text{\hspace{0.17em}}\sqrt{49}}{2}$

The discriminant is positive, so we have two solutions:

$x=\frac{8}{2}$ and $-\frac{6}{2}$

$x=4$ and $x=-3$

In this example, the discriminant was $49$, a perfect square, so we ended up with rational answers. Often, when using the quadratic formula, you end up with answers which still contain radicals.

Example 2:

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

Here $a=3,b=2,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}\text{\hspace{0.17em}}c=1$. Substituting, we get:

$x=\frac{-2\text{\hspace{0.17em}}±\text{\hspace{0.17em}}\sqrt{{2}^{2}-4\left(3\right)\left(1\right)}}{2\left(3\right)}$

Simplify.

$x=\frac{-2\text{\hspace{0.17em}}±\text{\hspace{0.17em}}\sqrt{-8}}{6}$

The discriminant is negative, so this equation has no real solutions.

Example 3:

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

Here $a=1,b=-4,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}\text{\hspace{0.17em}}c=2$. Substituting, we get:

$\begin{array}{l}x=\frac{-\left(-4\right)\text{\hspace{0.17em}}±\text{\hspace{0.17em}}\sqrt{{\left(-4\right)}^{2}-4\left(1\right)\left(2\right)}}{2\left(1\right)}\\ =\frac{4\text{\hspace{0.17em}}±\text{\hspace{0.17em}}\sqrt{16-8}}{2}\\ =\frac{4\text{\hspace{0.17em}}±\text{\hspace{0.17em}}\sqrt{8}}{2}\end{array}$

Simplify.

$\begin{array}{l}x=\frac{4\text{\hspace{0.17em}}±\text{\hspace{0.17em}}\sqrt{4\cdot 2}}{2}\\ =\frac{4\text{\hspace{0.17em}}±\text{\hspace{0.17em}}2\sqrt{2}}{2}\\ =\frac{2\left(2\text{\hspace{0.17em}}±\text{\hspace{0.17em}}\sqrt{2}\right)}{2}\\ =2±\sqrt{2}\end{array}$

The discriminant is positive but not a perfect square, so we have two real solutions:

$x=2+\sqrt{2}$ and $x=2-\sqrt{2}$