[Math] Matrix Notation Form of Roots of a Quadratic Equation

determinantdiscriminantmatricesquadratics

We know that the quadratic equation
$$f(x)=ax^2+bx+c=0$$
has roots
$$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}=-\frac b{2a}\pm \frac 1a\sqrt{-\left(ac-\frac {b^2}4\right)}$$

Also, $f(x)$ can be written in matrix notation as follows:
$$f(x)=
\left(\begin{matrix}x&1\\\end{matrix}\right)
\left(\begin{matrix}a&\frac b2\\\frac b2&c\end{matrix}\right)
\left(\begin{matrix}x\\1\end{matrix}\right)=\mathbf{x^T Q x}$$
where the determinant of $\mathbf Q$ is $\left(ac-\frac {b^2}4\right)=-\frac 14\left(b^2-4ac\right)$, where coincidentally the familiar $(b^2-4ac)$ is the discriminant of the quadratic $f(x)$.

Hence the roots of the quadratic $f(x)=0$ may be written as
$$x=-\frac b{2a}\pm \frac 1a\sqrt{-\det(\mathbf Q)}$$
This is equivalent to
$$\left(x+\frac b{2a}\right)^2=\frac {-\det(\mathbf Q)}{a^2}$$
Or in neater form,
$$\left(ax+\frac b{2}\right)^2={-\det(\mathbf Q)}$$

Question
Can the roots of $f(x)=0$ be derived and written completely in matrix notation, given the link between the determinant and discriminant as shown above?

Best Answer

I have obtained some formula with a little changed notation comparing the notation used in the question.

I've interchanged the components of $\mathbf x$ (the new vector is denoted as $\mathbf{ \hat{x}}$ ) and I've interchanged the entries on the main diagonal of $ \mathbf Q$ (new matrix is denoted as $ \mathbf M$ - interchanging entries on the diagonal for $2 \times 2$ matrices doesn't change the determinant) .

Then $f(x)$ can be written down as

$$f(x)= \begin{bmatrix}1&x\\\end{bmatrix} \begin{bmatrix}c&\frac b2\\\frac b2&a\end{bmatrix} \begin{bmatrix}1\\x\end{bmatrix} =\mathbf{\hat{x}^T M \hat{x}}=0$$

It can be calculated that

$ \begin{bmatrix}1 & x\\0 & 1\end{bmatrix} \begin{bmatrix}c & \frac{b}{2}\\\frac{b}{2} & a\end{bmatrix} \begin{bmatrix}1 & 0\\x & 1\end{bmatrix} = \begin{bmatrix}\frac{b x}{2} + c + x \left(a x + \frac{b}{2}\right) & a x + \frac{b}{2}\\a x + \frac{b}{2} & a\end{bmatrix} = \begin{bmatrix} 0 & a x + \frac{b}{2}\\a x + \frac{b}{2} & a \end{bmatrix} $

We know also that determinant of a matrix product is equal to the product of determinants of multiplied matrices.

Additionally we have $\det( \mathbf Q)=\det(\mathbf M)$.

From this follows that $ \det( \mathbf Q)=-\left( ax+ \frac{b}{2}\right)^2$.