For a general quadratic equation with rational coefficients
[tex]ax^2+bx+c=0,\,\,\,\,a,b,c \in Q[/tex]
the two solutions are:
[tex]x_{1,2} = \frac{-b\pm\sqrt{b^2-4ac}}{2a}=\frac{-b\pm\sqrt{D}}{2a}[/tex]
where D is the determinant.
Clearly, a solution will a rational number as long as [tex]\sqrt{D}[/tex] is rational. However, it can be shown that a square root of an integer is only rational if its value is an integer. In other words, [tex]\sqrt{D}[/tex] is rational if and only if the determinant is a perfect square, [tex]D=n^2, \,\,\,n\in N[/tex], otherwise the square root is irrational. Therefore the coefficients of quadratic equations that are to have rational solutions must satisfy the following condition:
[tex]b^2-4ac=n^2\,\,\,n\in N[/tex]