# Adding Math Formulas as inline HTML

## Inline MathJax

The scripts allow's math formulas to be written anywhere within the HTML code. To start a formula you use either a dollar sign $or you can use a slash and an open parentheses "/(". To end the inline math, you have another dollar sign or a back slash and a closing parentheses. Enclosing in double dollar signs put the math on its own line. Or you can use the backslash and a hard bracket "$". If you need to actually use a regular dollar sign in the text, then you need to 'escape' it so the page doesn't think its the start of math. In order to escape it you use a backslash before the dollar sign. "\\" Dollar sign before and after: y=mx+1 Parenthesis: $$y=mx+2$$ Double Dollar Signs: y=mx+3 Hard Bracket: \[y=mx+5$ In a sentence: When$a \ne 0\$, there are two solutions to $$ax^2 + bx + c = 0$$ and they are

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