If the equation is ax^2+bx+c=0ax2+bx+c=0, nature of roots is decided by discriminant b^2-4acb2−4ac
If aa, bb and cc are rational and b^2-4acb2−4ac is square of a rational number, roots are rational.
If b^2-4ac>0b2−4ac>0 but is not a square of a rational number, roots are real but not rational.
If b^2-4ac>0-0b2−4ac>0−0 we have equal roots.
If b^2-4ac<0b2−4ac<0 roots are complex
In x^2-7x+12=0x2−7x+12=0, discriminant is (-7)^2-4xx1xx12=49-48=1=1^2(−7)2−4×1×12=49−48=1=12
hence roots are rational. In fact
x^2-7x+12=0x2−7x+12=0
hArrx^2-4x-3x+12=0⇔x2−4x−3x+12=0
or x(x-4)-3(x-4)=0x(x−4)−3(x−4)=0
or (x-3)(x-4)=0(x−3)(x−4)=0 i.e. x=3x=3 or x=4x=4