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)}$$

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?

  • 1
    $\begingroup$ One of notation propositions - the last equation is equivalent to: $(\mathbf{x}^T\mathbf{w})^2+\det(Q)=0$ where $\mathbf {x}^T= \begin{bmatrix} x & 1 \end{bmatrix}$ and $\mathbf{w}=Q\mathbf{e_1}$. $\endgroup$ – Widawensen Apr 24 '18 at 10:26
  • 1
    $\begingroup$ Maybe somewhat relevant/related: eigenvalues of a 2x2 are $T/2 \pm \sqrt{T^2/4-D}$ and are roots of $x^2-Tx+D=0$ where $T$ is the trace and $D$ is the determinant. $\endgroup$ – jdods Apr 24 '18 at 10:42

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$.

  • $\begingroup$ Used calculations {{1,x} }* {{c,b/2},{b/2,a}} *{{1 }, {x }} at Wolphram Alpha $\endgroup$ – Widawensen Apr 24 '18 at 12:56
  • $\begingroup$ and {{1,x},{0,1}} * {{c,b/2},{b/2,a}} * {{1,0 }, {x,1 }} $\endgroup$ – Widawensen Apr 24 '18 at 13:02
  • $\begingroup$ Interesting results. Can you explain further the basis for your conclusion? It is clear that the determinant of the last matrix is $-(ax+\frac b2)^2$ but it is not clear how that links to $\det(\mathbf Q)$. $\endgroup$ – hypergeometric Apr 24 '18 at 16:35
  • $\begingroup$ @hypergeometric Determinant of matrix $M$ is the same as determinant of $Q$ ( see their forms or calculate them if you don't believe) , they have only changed $c$ and $a$ on the main diagonal , and taking into account that $\det(AMC)=\det(A)\det(M)\det(C)$ ( see multiplication of three matrices) and $\det(A)=1$ and $\det(C)=1$ ( upper triangular with 1's on main diagonal) the result follows.. Anyway I have a feeling that I solve your problem, is something more unclear in the solution? $\endgroup$ – Widawensen Apr 25 '18 at 8:30
  • 1
    $\begingroup$ Thanks for your solution (+1). $\endgroup$ – hypergeometric May 5 '18 at 15:54

Let us switch to homogeneous coordinates and use $2b$ instead of $b$ for convenience.


Assuming $Q$ diagonalizable, we have (the transformation $P$ can be taken orthonormal)


The last expression is of the form

$$\lambda_0u^2+\lambda_1v^2=0$$ where the lambdas are the Eigenvalues of $\mathbf Q$. For the equation to have real solutions, the Eigenvalues must have opposite signs, or $\lambda_0\lambda_1\le0$, which is precisely $-\det(\mathbf Q)=b^2-ac\ge0$.

The conic factors as


and the solutions are given by plugging $u=\mathbf{e_0p},v=\mathbf{e_1p}$ in the two factors, setting $y=1$ and solving the linear equations for $x$.

  • 1
    $\begingroup$ Thanks - interesting solution. (+1). $\endgroup$ – hypergeometric May 5 '18 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.