Quadratic equation

A **quadratic equation** is an equation where its highest exponent is 2 (which is why it is called 'quadratic' from the Latin word _quadratus_ 'square'). These equations can be rearranged to the standard form which isː

where _a_ is not equal to 0, otherwise the equation is linear.

It makes a parabola (a "U" shape) when graphed on a coordinate plane. When people work with quadratic equations, one of the most common things they do is to _solve_ it. This means to find the points on a coordinate grid where the graphed equation crosses the x-axis, or the horizontal axis. These points are called the "zeroes", or "roots", of a function. In other words, to solve the equation means to find the value of _x_ so that , where the coefficients, _a_, _b_, and _c_, are all real numbers. There are different ways to find out the value of x. Plotting the function on a graph is one way. In the picture on the right, the function crosses the x-axis at the points  and .

Graphing a quadratic equation makes it is very easy to find the roots, but it is not always convenient. So there are different ways to do this using math.

## Solving quadratic equations

A quadratic equation with real or complex coefficients has two solutions, called _roots_. These two solutions may or may not be equal, and they may or may not be a real number.

### Factoring

Some quadratic equations, like , can be factorized. This equation can be written as , which produces two separate equations,  and . This is because when any of the two equations is equal to zero, the original equation is equal to zero because the two equations are multiplied together to form the quadratic equation. From this equation, it is easy to use algebra to find out what the value of _x_ is. In the first of the two equations,  and in the second, . This means that these two values of _x_ will make the whole quadratic equation equal to zero. The y-coordinate is equal to zero at these values of x, and so the coordinates  and  are the places where the graph of the function crosses the x-axis.

### Completing the square

Not all quadratic equations can be factorized, such as . One of the ways to solve these kinds of equations is called _completing the square_. This means to find some value for "_k_" below so that: for some _y_. Since  and  this means

There are five steps to solve a quadratic equation by completing the square:

1. Divide the equation by the value of _a_ (here, _a_ is equal to 5):
1. Move the number term (the one without any coefficients, here ) to the other side:
1. Complete the square by adding  to both sides on the equation, as was described above. This value here is . This gives , and the left side can be factored to give
1. Find the square root of both sides. The  is there since the square root is for both positive and negative values:
1. Finally, move the number term to the other side to get a value for _x_:

This last value for _x_ has two values:  and . These are the x-coordinates at the points where the y-coordinates are equal to zero and so the function crosses the x-axis.

It is also interesting to note that the vertex of the function, , can be found from the equation in step 3 above.

### The quadratic formula

Although completing the square can be used to solve many quadratic equations, it does not work with every equation. There is a way to find the value of _x_ that makes the equation true by replacing the values in a formula with the coefficients from the quadratic equation. This is called the "quadratic formula", which is:

The numbers represented by _a_, _b_, and _c_ are the same as those in the original equation, . For this formula to work properly, _a_ cannot be equal to 0 for the formula (but really, when _a_ = 0 in the original equation, it is not quadratic since there is no x-squared term).

The factored form of this equation is , where _s_ and _t_ are the zeros, _a_ is a constant, and _y_ and the two values of _x_ are ordered pairs which satisfy the equation.

#### Proof of the formula

The quadratic formula can be found out, or proved, using the same _completing the square_ method from above, only by using _a_, _b_, and _c_ instead of actual values and using algebra to find the value of _x_. Here is how:

1. Divide the equation by _a:_
1. Move  to the other side:
1. Complete the square by adding  to both sides on the equation, which gives:  The left side is now a perfect square; it is the square of The right side can be a single fraction, with a common denominator :
1. Find the square root of both sides:
1. Finally, move  to the other side:

#### Using the quadratic formula

Now that the value of _x_ has been found out, the values of _a_, _b_, and _c_ are replaced with the corresponding coefficients from the original equation. For example, going back to the second example,  , it can be seen that the values are , , and . By putting these values into the quadratic formula and solving, the result is:

. Solving the two square roots, the value of _x_ can be either 1.148 or -0.348, which is the same as above.

Unlike the other methods described above, the quadratic equation will work with every possible value for _a_, _b_, and _c_, even if there are no "real roots", that is, places where the graph of the function touches the x-axis.

The value inside the square root, that is, , is known as the _discriminant_. It can tell whether the roots are real or complex. There are three cases:

1. If the discriminant is positive, there will be two values for _x_ and therefore two separate roots, one at each place where the graph crosses the x-axis.
1. If the discriminant is equal to zero, there is only one value for _x_, but there are in fact two roots which are equal. The graph touches the x-axis at its vertex, but does not cross it.
1. If the discriminant is negative, there is no real value of _x_. On a graph, the function does not even touch the x-axis, but the roots are still there. The value of the roots here is a complex number, which uses the value _i_ to represent .

## History

Babylonian mathematicians, as early as 2000 BC (displayed on Old Babylonian clay tablets) could solve problems relating the areas and sides of rectangles. There is evidence dating this algorithm as far back as the Third Dynasty of Ur. In modern notation, the problems typically involved solving a pair of simultaneous equations of the form:

which is equivalent to the statement that  and  are the roots of the equation:

The steps given by Babylonian scribes for solving the above rectangle problem, in terms of  and , were as follows:

1. Compute half of _p_.
1. Square the result.
1. Subtract _q_.
1. Find the (positive) square root using a table of squares.
1. Add together the results of steps (1) and (4) to give .

In modern notation this means calculating , which is equivalent to the modern day quadratic formula for the larger real root (if any)  with , , and .

## Other websites

- Online calculators - Quadratic equation