Quadratic equations are problems with squares, or “quadratus” in Latin. We derive a method to solve quadratic equations. In 2000 BC, the Babylonians developed an approach to solve problems which, in current notation would be a quadratic equation [wiki]. A arbitrary example of this is:\(\)
A field has a perimeter of 40 and an area of 96. What are the dimensions of this field?”
Around 300 BC, the Greek mathematician Euclid produced a general method to solve quadratic equations.
Introduction
Before we introduce quadratic polynomials, let’s start by multiplying two linear functions (lines).
Multiplying linear functions
Let \(g(x)\) and \(h(x)\) be linear functions
where \(x\) is a variable and \(s\) and \(t\) are constants.
The function value equals \(0\) at the \(x\)-intercepts.
First, we define function \(f(x)\) as a scalar \(a\) multiplied with the functions \(g(x)\) and \(h(x)\)
This equation results in the parabola \(f(x)\) that shares \(x\)-intercepts with the two lines.
The interactive graph above visualizes the zero product property:
If the product of two quantities is equal to zero, then at least one of the quantities must be equal to zero. zero-product property
Expand
The expression \((x-s)(x-t)\) from function \(\eqref{eq:GxHxFactorized}\) can be expanded geometrically by representing the quantities \(x, -s, -t\) as line segments, and representing the products of two quantities by the area of a rectangle.
Now we multiply this expanded form with scalar \(a\):
The equation now fits in the standard form for a single variable quadratic polynomial expression.
This is called a quadratic expression, or a second order polynomial since the greatest power in the equation is two.
Solutions to Quadratic Equation
In the previous section we showed that multiplying two linear functions creates a quadratic function. Here we will do the opposite and bring the standard form quadratic \(\eqref{eq:quadraticExp}\) back to its factorized form.
We replaced the constants \(s\) and \(t\) with \(r_1\) and \(r_2\) to clearly denote them as the roots.
According to \(\eqref{eq:quadraticExp}\) these roots should add up to \(-\frac{b}{a}\) and while their product equals \(\frac{c}{a}\)
In the following section, we will derive a general formula for the roots using a method called “completing the square”.
Derive the Quadratic Formula
In the factorized form, \(r_1\) and \(r_2\) are the values of \(x\) for which the expression equals \(0\).
This implies that the expanded form \(\eqref{eq:quadratic}\) must equal \(0\) for the same values of \(x\).
Now we solve the equation \(\eqref{eq:derive0}\) by isolating \(x\) on the left
The variable \(x\) occurs twice, which makes the equation hard to solve. We can find the solutions by working towards the identity:
$$ \color{green}{p}^2+2\color{green}{p}\color{purple}{q}+\color{purple}{q}^2=(\color{green}{p}+\color{purple}q)^2\nonumber $$
Then we multiply equation \(\eqref{eq:derive1}\) by \(4a^2\)and add \(\color{purple}b^2\) to both sides.
The left side now fits the format of the identify, where \(\color{green}p=\color{green}{2ax}\) and \(\color{purple}q=\color{purple}b\). Now we apply the identity to equation \(\eqref{eq:derive2}\)
The roots found by this equation are the values of \(x\) that are solutions to \(\eqref{eq:roots}\). This implies that the expression \(ax^2+bx+c\) can be factorized as:
Discriminant
A polynomial of the second power always has two roots, though they may or may not be distinct or real.
The expression under the square root sign in \(\eqref{eq:quadroots}\) is called the discriminant, or \(D\).
The discriminant determines the nature of the roots.
- when \(D>0\), there are two distinct real roots.
- when \(D=0\), there is a double real root.
- when \(D\lt0\), there are two complex roots.
The unit Complex Numbers defined the imaginary unit \(i\) as \(i^2=-1\) and showed that each complex number \(z\) consists of a real part \(x\) and an imaginary part \(iy\), where \(x\) and \(y\) are real numbers. Using \(i\) as the imaginary unit, we can denote any complex number \(z\) as:
These complex numbers extend the number line to a two-dimensional \(\mathbb{C}\)-plane as shown below.
Real roots
The distinct or double real roots can be easily visualized by plotting the function and finding the \(x\)-intercepts. These intercepts are the roots.
In the figures above the function depicted in the graph on the left has real roots at \(1\) and \(3\), and the function on the right has a double root at \(2\).
Where are the imaginary roots?
When the roots of a function are complex, the quadratic function \(\eqref{eq:quadratic}\) has a graph that doesn’t intersect the \(x\)-axis as shown below. So where are those roots?
The quadratic formula \(\eqref{eq:quadroots}\) tells us that the roots for the function depicted in the graph above are \(2+2j\) and \(2-2j\).
To find these complex roots visually, we need to broaden our perspective and allow the independent variable \(x\) to have complex values. After all, these roots are complex values. From here on we will name the variable \(z\) instead of \(x\) to emphasize that \(z\in\mathbb{C}\). We will reuse \(x\) for the real part of \(z\).
Evaluate quadratic expression \(\eqref{eq:quadratic}\) with variable \(z\) follows
With a complex function argument \(x+yj\) \(\eqref{eq:zdef}\) and a complex function value \(u+iv\) \(\eqref{eq:fzdef}\), we need four mutually perpendicular axes \(x,y,u,v\) to graph the function. The catch: we can’t graph a 4-dimensional function.
To reduced the graph to a 3-dimensions, either
- Only consider variables \(z\) for which the function value is a real number, and graph the function value on z-axis perpendicular to the \(\mathbb{C}\)-plane. The roots will be where the graph intersects the \(\mathbb{C}\)-plane.
- Consider all variables \(z\in\mathbb{C}\), but take only the modulus of the function value \(|f(z)|\).
The following sections describe each of two visualization techniques. ^{[1] }
Plotting real function values
Now we graph the function \(\eqref{eq:zquadratic}\), considering only values of \(z\) for which the function value \(f(z)=u+jv\) is real (v=0).
We can let the variable be \(z=x+jy\) and split the function value \(\eqref{eq:fzdef}\) into real and imaginary parts
The imaginary part of the function value must be \(0\).
Substitute the value \(y=0\) in \eqref{eq:zdef}
Do the same for \(x=-\tfrac{b}{2a}\)
This implies that the function \(\eqref{eq:zquadratic}\) has a real-value
- when evaluated for \(z=x\) where \(x\in\mathbb{R}\), or
- when evaluated for \(z=-\frac{b}{2a}+yj\) where \(y\in\mathbb{R}\)
In the first case, evaluating for \(z=x\) where \(x\in\mathbb{R}\), means evaluating along the familiar \(x\)-axis. This is how we visualized the real roots.
In the second case, evaluating for \(z=-\tfrac{b}{2a}+yj\) where \(y\in\mathbb{R}\), means evaluating along a line that intersects the point \(\left(-\frac{b}{2a}+0j\right)\) and runs parallel to the imaginary \(y\)-axis as shown in the figure below.
Substituting \(-\frac{b}{2a}+yj\) for \(z\) in \(\eqref{eq:zquadratic}\).
This makes \eqref{eq:fy0} a function of \(y\) because \(a,b\) and \(j\) are constants.
Similar to how the graph for \(f(x)\) intersects the \(\mathbb{C}\)-plane at the real roots, the graph for \eqref{eq:fy} intersects the \(\mathbb{C}\)-plane at the complex roots of the function.
The interactive graph shown below visualizes this concept. Click Interact
and wait for the model to load.
Plotting the modulus of the function values
Here we graph the function \(\eqref{eq:zquadratic}\) by considering all values of \(z\), but only plotting the modules of the function value \(f(z)\). The modulus \(|f(x+jy)|\) is defined as:
$$ |f(x+jy)|\triangleq\sqrt{x^2+y^2}\nonumber $$
To find the modulus of the function value, we can apply the definition \(\eqref{eq:zdef}\) to the quadratic equation \(\eqref{eq:zquadratic}\).
This equation implies that the function arguments are two independent variables. In the graph we depict them as a horizontal complex plane with points \(z=x+jy\). The \(z\)-axis of the graph is used for the modulus of the function value. In this so called modulus surface, color is used to show the angle of the function value.
While this surface is well suited to depict real and complex values, it has some drawbacks. The most obvious one is that it shows the modulus of the function where \(|f(z)|\geq0\). As a consequence, the parabolic shape is harder to recognize.
In the graph below, we added the real function values \(f(z_c)\) from the previous visualization technique that showed negative values. In the surface plot, these same function values are represented on the positive \(z\)-axis but shown in red to signify an angle of \(\varphi=\pi\), where \(\mathrm{e}^{j\pi}=-1\).
To draw a modulus surface, you can either use the model below, or you can using the code shown in Appendix A. Click Interact
, wait for the model to load and click on \(|f(z)|\).
Appendix A
clear [x,y] = meshgrid(-10: 0.1: 10); z = x + i*y; fz = z.^2 - 4.*z + 8; surf(x,y,abs(fz), angle(fz)); zlim([0,20]); xlabel("x"); ylabel("y"); zlabel ("|f(x+jy)|"); shading interp;
References
[1] | The Complex Roots of a Quadratic Equation: A Visualization Carmen Q Artino, Professor in Mathematics at The College of Saint Rose, Albany, NY. Parabola Volume 45, Issue 3 (2009) |