All formulas

Mathematics

Quadratic formula - formula in LaTeX

The expression under the root is the discriminant: positive gives two real solutions, zero gives one, negative gives none. The whole numerator goes in the first braces of \dfrac and the denominator in the second. Missing braces around the numerator are the most common mistake here.

x=−b±b2−4ac2ax = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}

LaTeX code

$$
x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$

Got this formula in your notes or on a whiteboard? Snap a photo and CamteX turns it into LaTeX. Try it free

What the symbols mean

xx
roots of the equation ax² + bx + c = 0
a,b,ca, b, c
coefficients of the equation, a nonzero

A math formula - one of the most frequently typed in assignments, lecture notes and calculus or algebra homework.

Worked example

With a = 1, b = −5 and c = 6 the discriminant is 1, so there are two roots. The implication arrow is \Rightarrow, and \quad spaces out the steps on one line.

x2−5x+6=0⇒Δ=25−24=1,x1=5−12=2,x2=5+12=3x^2 - 5x + 6 = 0 \quad\Rightarrow\quad \Delta = 25 - 24 = 1, \quad x_1 = \dfrac{5 - 1}{2} = 2, \quad x_2 = \dfrac{5 + 1}{2} = 3

Other ways to write it

LaTeX commands in this formula

\dfrac
fraction (display)
\pm
plus-minus sign
\sqrt
square root
x^{2}
superscript (power); wrap several characters in braces

How to use this formula in LaTeX?

  1. Copy the code with the button above - $$…$$ is centered display math.
  2. Paste it into the CamteX editor, Overleaf or any LaTeX document.
  3. Inside a sentence, use single $…$ instead of double.
  4. The formula needs the amsmath package - CamteX templates include it in the preamble.

Related formulas - Mathematics

Drawing formulas is faster than typing them.

Draw a formula, table or chart - CamteX AI turns it into ready LaTeX and inserts it into your document.

Try it free