Basics Elementary Middle School High School University Advanced
How to Write Math Formulas

Wrap your formula with "$" (dollar signs) to display it.
Example: Writing $x^2 + 3x - 4 = 0$ displays as $x^2 + 3x - 4 = 0$.

Positive and Negative Numbers (Grade 7)

Positive and Negative Numbers
Code:
$+5$, $-3$
Display:
$+5$, $-3$
Absolute Value
Code:
$|-7| = 7$, $|+3| = 3$
Display:
$|-7| = 7$, $|+3| = 3$
Addition with Signs
Code:
$(+3) + (-5) = -2$
Display:
$(+3) + (-5) = -2$
Subtraction with Signs
Code:
$(+3) - (-5) = (+3) + (+5) = 8$
Display:
$(+3) - (-5) = (+3) + (+5) = 8$
Multiplication Signs
Code:
$(+) \times (+) = (+)$, $(+) \times (-) = (-)$, $(-) \times (-) = (+)$
Display:
$(+) \times (+) = (+)$, $(+) \times (-) = (-)$, $(-) \times (-) = (+)$

Algebraic Expressions (Grade 7-8)

Terms with Coefficients
Code:
$3x$, $-2y$, $5a$
Display:
$3x$, $-2y$, $5a$
Combining Like Terms
Code:
$3x + 2x = 5x$
Display:
$3x + 2x = 5x$
Distributive Property
Code:
$a(b + c) = ab + ac$
Display:
$a(b + c) = ab + ac$
Multiplying Monomials
Code:
$2x \times 3y = 6xy$
Display:
$2x \times 3y = 6xy$
Polynomial Addition
Code:
$(2x + 3) + (4x - 1) = 6x + 2$
Display:
$(2x + 3) + (4x - 1) = 6x + 2$

Powers and Roots (Grade 9)

Square (Power of 2)
Code:
$x^2$, $5^2 = 25$
Display:
$x^2$, $5^2 = 25$
Cube (Power of 3)
Code:
$a^3$, $2^3 = 8$
Display:
$a^3$, $2^3 = 8$
Square Root
Code:
$\sqrt{2}$, $\sqrt{9} = 3$
Display:
$\sqrt{2}$, $\sqrt{9} = 3$
Positive and Negative Roots
Code:
$x^2 = 9$ then $x = \pm 3$
Display:
$x^2 = 9$ then $x = \pm 3$
Laws of Exponents
Code:
$a^m \times a^n = a^{m+n}$, $a^m \div a^n = a^{m-n}$
Display:
$a^m \times a^n = a^{m+n}$, $a^m \div a^n = a^{m-n}$

Equations (Grade 7-9)

Linear Equation (Grade 7)
Code:
$2x + 5 = 13$
Display:
$2x + 5 = 13$
Solving Linear Equations
Code:
$2x + 5 = 13$ then $2x = 8$ then $x = 4$
Display:
$2x + 5 = 13$ then $2x = 8$ then $x = 4$
System of Equations (Grade 8)
Code:
$\begin{cases} 2x + y = 7 \\ x - y = 2 \end{cases}$
Display:
$\begin{cases} 2x + y = 7 \\ x - y = 2 \end{cases}$
Substitution Method
Code:
From $y = 2x - 1$, substitute into $3x + y = 9$
Display:
From $y = 2x - 1$, substitute into $3x + y = 9$
Quadratic Equation (Grade 9)
Code:
$x^2 - 5x + 6 = 0$
Display:
$x^2 - 5x + 6 = 0$
Quadratic Formula
Code:
$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$
Display:
$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$

Inequalities

Linear Inequality
Code:
$3x - 4 > 8$
Display:
$3x - 4 > 8$
Greater/Less Than or Equal
Code:
$-2 \leq x \leq 5$
Display:
$-2 \leq x \leq 5$
Not Equal
Code:
$x \neq 0$
Display:
$x \neq 0$

Expanding Expressions (Grade 9)

Square of Sum
Code:
$(a + b)^2 = a^2 + 2ab + b^2$
Display:
$(a + b)^2 = a^2 + 2ab + b^2$
Square of Difference
Code:
$(a - b)^2 = a^2 - 2ab + b^2$
Display:
$(a - b)^2 = a^2 - 2ab + b^2$
Product of Sum and Difference
Code:
$(a + b)(a - b) = a^2 - b^2$
Display:
$(a + b)(a - b) = a^2 - b^2$
General Binomial Product
Code:
$(x + a)(x + b) = x^2 + (a+b)x + ab$
Display:
$(x + a)(x + b) = x^2 + (a+b)x + ab$

Factorization (Grade 9)

Factoring Out Common Factor
Code:
$6x + 9 = 3(2x + 3)$
Display:
$6x + 9 = 3(2x + 3)$
Difference of Squares
Code:
$a^2 - b^2 = (a + b)(a - b)$
Display:
$a^2 - b^2 = (a + b)(a - b)$
Perfect Square Trinomial
Code:
$a^2 + 2ab + b^2 = (a + b)^2$
Display:
$a^2 + 2ab + b^2 = (a + b)^2$
Factoring Trinomials
Code:
$x^2 + 5x + 6 = (x + 2)(x + 3)$
Display:
$x^2 + 5x + 6 = (x + 2)(x + 3)$

Functions (Grade 7-9)

Function Notation
Code:
$y$ is a function of $x$: $y = f(x)$
Display:
$y$ is a function of $x$: $y = f(x)$
Domain and Range
Code:
Domain: values of $x$, Range: values of $y$
Display:
Domain: values of $x$, Range: values of $y$

Direct & Inverse Proportion (Grade 7)

Direct Proportion
Code:
$y = ax$ (where $a$ is a non-zero constant)
Display:
$y = ax$ (where $a$ is a non-zero constant)
Inverse Proportion
Code:
$y = \frac{a}{x}$ or $xy = a$ (where $a$ is a non-zero constant)
Display:
$y = \frac{a}{x}$ or $xy = a$ (where $a$ is a non-zero constant)
Finding the Constant of Proportionality
Code:
If $y = ax$ and $(x, y) = (2, 6)$, then $a = \frac{y}{x} = 3$
Display:
If $y = ax$ and $(x, y) = (2, 6)$, then $a = \frac{y}{x} = 3$

Linear Functions (Grade 8)

Linear Function Form
Code:
$y = ax + b$ ($a$: slope, $b$: y-intercept)
Display:
$y = ax + b$ ($a$: slope, $b$: y-intercept)
Slope Formula
Code:
Slope $a = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x}$
Display:
Slope $a = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x}$
Finding a Linear Function
Code:
Through $(1, 3)$ and $(3, 7)$: slope $= \frac{7-3}{3-1} = 2$, so $y = 2x + 1$
Display:
Through $(1, 3)$ and $(3, 7)$: slope $= \frac{7-3}{3-1} = 2$, so $y = 2x + 1$
X-Intercept
Code:
For $y = 2x - 4$: when $y = 0$, $x = 2$ (x-intercept is 2)
Display:
For $y = 2x - 4$: when $y = 0$, $x = 2$ (x-intercept is 2)

Quadratic Functions (Grade 9)

Basic Quadratic Function
Code:
$y = ax^2$ (parabola with vertex at origin)
Display:
$y = ax^2$ (parabola with vertex at origin)
Parabola Direction
Code:
$a > 0$: opens upward, $a < 0$: opens downward
Display:
$a > 0$: opens upward, $a < 0$: opens downward
Rate of Change
Code:
Rate of change from $x = 1$ to $x = 3$ for $y = x^2$: $\frac{9 - 1}{3 - 1} = 4$
Display:
Rate of change from $x = 1$ to $x = 3$ for $y = x^2$: $\frac{9 - 1}{3 - 1} = 4$

Plane Geometry (Grade 7)

Circumference of Circle
Code:
$C = 2\pi r$ or $C = \pi d$
Display:
$C = 2\pi r$ or $C = \pi d$
Area of Circle
Code:
$S = \pi r^2$
Display:
$S = \pi r^2$
Area of Sector
Code:
$S = \pi r^2 \times \frac{\theta}{360}$
Display:
$S = \pi r^2 \times \frac{\theta}{360}$
Arc Length
Code:
$l = 2\pi r \times \frac{\theta}{360}$
Display:
$l = 2\pi r \times \frac{\theta}{360}$

Solid Geometry (Grade 7)

Volume of Rectangular Prism
Code:
$V = lwh$
Display:
$V = lwh$
Volume of Cylinder
Code:
$V = \pi r^2 h$
Display:
$V = \pi r^2 h$
Volume of Cone
Code:
$V = \frac{1}{3}\pi r^2 h$
Display:
$V = \frac{1}{3}\pi r^2 h$
Volume of Sphere
Code:
$V = \frac{4}{3}\pi r^3$
Display:
$V = \frac{4}{3}\pi r^3$
Surface Area of Sphere
Code:
$S = 4\pi r^2$
Display:
$S = 4\pi r^2$

Triangle Congruence (Grade 8)

Congruent Triangles
Code:
$\triangle ABC \cong \triangle DEF$
Display:
$\triangle ABC \cong \triangle DEF$
SSS Congruence
Code:
$AB = DE$, $BC = EF$, $CA = FD$ (Three sides equal)
Display:
$AB = DE$, $BC = EF$, $CA = FD$ (Three sides equal)
SAS Congruence
Code:
$AB = DE$, $\angle B = \angle E$, $BC = EF$ (Two sides and included angle)
Display:
$AB = DE$, $\angle B = \angle E$, $BC = EF$ (Two sides and included angle)
ASA Congruence
Code:
$\angle A = \angle D$, $AB = DE$, $\angle B = \angle E$ (Two angles and included side)
Display:
$\angle A = \angle D$, $AB = DE$, $\angle B = \angle E$ (Two angles and included side)

Parallel Lines and Angles (Grade 8)

Parallel Lines
Code:
$l \parallel m$ (lines $l$ and $m$ are parallel)
Display:
$l \parallel m$ (lines $l$ and $m$ are parallel)
Corresponding Angles
Code:
If $l \parallel m$, corresponding angles are equal
Display:
If $l \parallel m$, corresponding angles are equal
Alternate Interior Angles
Code:
If $l \parallel m$, alternate interior angles are equal
Display:
If $l \parallel m$, alternate interior angles are equal
Sum of Interior Angles of Triangle
Code:
$\angle A + \angle B + \angle C = 180°$
Display:
$\angle A + \angle B + \angle C = 180°$
Exterior Angle of Triangle
Code:
Exterior angle $=$ sum of two non-adjacent interior angles
Display:
Exterior angle $=$ sum of two non-adjacent interior angles

Similarity (Grade 9)

Similar Triangles
Code:
$\triangle ABC \sim \triangle DEF$
Display:
$\triangle ABC \sim \triangle DEF$
Ratio of Similarity
Code:
$AB : DE = BC : EF = CA : FD = k : 1$
Display:
$AB : DE = BC : EF = CA : FD = k : 1$
Ratio of Areas
Code:
If ratio of sides is $k : 1$, ratio of areas is $k^2 : 1$
Display:
If ratio of sides is $k : 1$, ratio of areas is $k^2 : 1$
Midpoint Theorem
Code:
Line connecting midpoints of two sides is parallel to third side and half its length
Display:
Line connecting midpoints of two sides is parallel to third side and half its length

Pythagorean Theorem (Grade 9)

Pythagorean Theorem
Code:
$a^2 + b^2 = c^2$ ($c$ is the hypotenuse)
Display:
$a^2 + b^2 = c^2$ ($c$ is the hypotenuse)
Common Pythagorean Triples
Code:
$(3, 4, 5)$, $(5, 12, 13)$, $(8, 15, 17)$
Display:
$(3, 4, 5)$, $(5, 12, 13)$, $(8, 15, 17)$
Special Right Triangles (45-45-90)
Code:
Sides ratio $1 : 1 : \sqrt{2}$
Display:
Sides ratio $1 : 1 : \sqrt{2}$
Special Right Triangles (30-60-90)
Code:
Sides ratio $1 : 2 : \sqrt{3}$
Display:
Sides ratio $1 : 2 : \sqrt{3}$
Distance Formula
Code:
Distance between $(x_1, y_1)$ and $(x_2, y_2)$: $\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$
Display:
Distance between $(x_1, y_1)$ and $(x_2, y_2)$: $\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$

Circles (Grade 9)

Inscribed Angle
Code:
Inscribed angle $= \frac{1}{2} \times$ central angle (same arc)
Display:
Inscribed angle $= \frac{1}{2} \times$ central angle (same arc)
Inscribed Angles on Same Arc
Code:
Inscribed angles subtending the same arc are equal
Display:
Inscribed angles subtending the same arc are equal
Angle in Semicircle
Code:
Inscribed angle in semicircle $= 90°$
Display:
Inscribed angle in semicircle $= 90°$
Tangent to Circle
Code:
Tangent is perpendicular to radius at point of tangency
Display:
Tangent is perpendicular to radius at point of tangency
Tangent Lines from External Point
Code:
Two tangents from external point have equal length: $PA = PB$
Display:
Two tangents from external point have equal length: $PA = PB$

Probability & Statistics (Grade 7-8)

Probability Definition
Code:
$P(A) = \frac{a}{n}$ ($a$: favorable outcomes, $n$: total outcomes)
Display:
$P(A) = \frac{a}{n}$ ($a$: favorable outcomes, $n$: total outcomes)
Probability Range
Code:
$0 \leq P(A) \leq 1$
Display:
$0 \leq P(A) \leq 1$
Complement Probability
Code:
$P(\overline{A}) = 1 - P(A)$
Display:
$P(\overline{A}) = 1 - P(A)$
Dice Probability (Example)
Code:
Probability of rolling 1: $P = \frac{1}{6}$
Display:
Probability of rolling 1: $P = \frac{1}{6}$
Tree Diagram Counting
Code:
Flipping coin 3 times: $2 \times 2 \times 2 = 8$ outcomes
Display:
Flipping coin 3 times: $2 \times 2 \times 2 = 8$ outcomes
Permutations (Arrangements)
Code:
Arranging 3 people in a line: $3 \times 2 \times 1 = 6$ ways
Display:
Arranging 3 people in a line: $3 \times 2 \times 1 = 6$ ways
Combinations (Selections)
Code:
Choosing 2 from 5 people: $\frac{5 \times 4}{2 \times 1} = 10$ ways
Display:
Choosing 2 from 5 people: $\frac{5 \times 4}{2 \times 1} = 10$ ways

Data Analysis (Grade 7-9)

Mean (Average)
Code:
$\bar{x} = \frac{x_1 + x_2 + \cdots + x_n}{n}$
Display:
$\bar{x} = \frac{x_1 + x_2 + \cdots + x_n}{n}$
Median
Code:
Middle value when data is sorted (average of middle two if $n$ is even)
Display:
Middle value when data is sorted (average of middle two if $n$ is even)
Mode
Code:
The value that appears most frequently in the data
Display:
The value that appears most frequently in the data
Range
Code:
Range = Maximum $-$ Minimum
Display:
Range = Maximum $-$ Minimum
Relative Frequency
Code:
Relative frequency = $\frac{\text{Class frequency}}{\text{Total frequency}}$
Display:
Relative frequency = $\frac{\text{Class frequency}}{\text{Total frequency}}$
Quartiles
Code:
First quartile $Q_1$, Median $Q_2$, Third quartile $Q_3$
Display:
First quartile $Q_1$, Median $Q_2$, Third quartile $Q_3$
Interquartile Range (IQR)
Code:
IQR $= Q_3 - Q_1$
Display:
IQR $= Q_3 - Q_1$
Box Plot (Box-and-Whisker)
Code:
Shows: Minimum, $Q_1$, $Q_2$ (Median), $Q_3$, Maximum
Display:
Shows: Minimum, $Q_1$, $Q_2$ (Median), $Q_3$, Maximum

Calculations with Radicals (Grade 9)

Multiplying Radicals
Code:
$\sqrt{a} \times \sqrt{b} = \sqrt{ab}$ (e.g., $\sqrt{2} \times \sqrt{3} = \sqrt{6}$)
Display:
$\sqrt{a} \times \sqrt{b} = \sqrt{ab}$ (e.g., $\sqrt{2} \times \sqrt{3} = \sqrt{6}$)
Dividing Radicals
Code:
$\frac{\sqrt{a}}{\sqrt{b}} = \sqrt{\frac{a}{b}}$ (e.g., $\frac{\sqrt{8}}{\sqrt{2}} = \sqrt{4} = 2$)
Display:
$\frac{\sqrt{a}}{\sqrt{b}} = \sqrt{\frac{a}{b}}$ (e.g., $\frac{\sqrt{8}}{\sqrt{2}} = \sqrt{4} = 2$)
Simplifying Radicals
Code:
$\sqrt{a^2 b} = a\sqrt{b}$ (e.g., $\sqrt{18} = \sqrt{9 \times 2} = 3\sqrt{2}$)
Display:
$\sqrt{a^2 b} = a\sqrt{b}$ (e.g., $\sqrt{18} = \sqrt{9 \times 2} = 3\sqrt{2}$)
Rationalizing Denominators
Code:
$\frac{1}{\sqrt{2}} = \frac{\sqrt{2}}{2}$
Display:
$\frac{1}{\sqrt{2}} = \frac{\sqrt{2}}{2}$
Adding/Subtracting Radicals
Code:
$2\sqrt{3} + 5\sqrt{3} = 7\sqrt{3}$
Display:
$2\sqrt{3} + 5\sqrt{3} = 7\sqrt{3}$
Expanding with Radicals
Code:
$(\sqrt{2} + 1)^2 = 2 + 2\sqrt{2} + 1 = 3 + 2\sqrt{2}$
Display:
$(\sqrt{2} + 1)^2 = 2 + 2\sqrt{2} + 1 = 3 + 2\sqrt{2}$

Special Symbols

Plus-Minus
Code:
$x = 3 \pm 2$
Display:
$x = 3 \pm 2$
Infinity
Code:
$\infty$
Display:
$\infty$
Approximately Equal
Code:
$\pi \approx 3.14$
Display:
$\pi \approx 3.14$
Absolute Value
Code:
$|x| = 5$
Display:
$|x| = 5$

Usage Examples in Reading Notes

Example 1: Equation Problem
Code:
p.78 problem: Solve $x^2 - 7x + 12 = 0$. Factoring: $(x-3)(x-4)=0$, so $x=3, 4$
Display:
p.78 problem: Solve $x^2 - 7x + 12 = 0$. Factoring: $(x-3)(x-4)=0$, so $x=3, 4$
Example 2: Pythagorean Theorem Application
Code:
When a right triangle has legs of $3$ and $4$, the hypotenuse is $\sqrt{3^2 + 4^2} = \sqrt{25} = 5$
Display:
When a right triangle has legs of $3$ and $4$, the hypotenuse is $\sqrt{3^2 + 4^2} = \sqrt{25} = 5$
Example 3: Function Graph
Code:
The vertex of $y = 2x^2 - 8x + 6$ is found by completing the square: $y = 2(x-2)^2 - 2$, so vertex is $(2, -2)$
Display:
The vertex of $y = 2x^2 - 8x + 6$ is found by completing the square: $y = 2(x-2)^2 - 2$, so vertex is $(2, -2)$
Common Symbol Reference
  • \times → multiplication ×
  • \div → division ÷
  • \pm → plus-minus ±
  • \leq → less than or equal ≤
  • \geq → greater than or equal ≥
  • \neq → not equal ≠
  • \sqrt{} → square root √
  • \frac{numerator}{denominator} → fraction
  • ^ → exponent (e.g., x^2 gives x²)
  • \pi → pi π
  • \infty → infinity ∞
  • \approx → approximately ≈

Chemical Formulas & Equations (Grade 8)

Electrolysis of Water
Code:
$2\text{H}_2\text{O} \rightarrow 2\text{H}_2 + \text{O}_2$
Display:
$2\text{H}_2\text{O} \rightarrow 2\text{H}_2 + \text{O}_2$
Combustion of Hydrogen (Water Synthesis)
Code:
$2\text{H}_2 + \text{O}_2 \rightarrow 2\text{H}_2\text{O}$
Display:
$2\text{H}_2 + \text{O}_2 \rightarrow 2\text{H}_2\text{O}$
Reduction of Copper Oxide
Code:
$2\text{CuO} + \text{C} \rightarrow 2\text{Cu} + \text{CO}_2$
Display:
$2\text{CuO} + \text{C} \rightarrow 2\text{Cu} + \text{CO}_2$
Combustion of Magnesium (Oxidation)
Code:
$2\text{Mg} + \text{O}_2 \rightarrow 2\text{MgO}$
Display:
$2\text{Mg} + \text{O}_2 \rightarrow 2\text{MgO}$
Decomposition of Sodium Bicarbonate
Code:
$2\text{NaHCO}_3 \rightarrow \text{Na}_2\text{CO}_3 + \text{H}_2\text{O} + \text{CO}_2$
Display:
$2\text{NaHCO}_3 \rightarrow \text{Na}_2\text{CO}_3 + \text{H}_2\text{O} + \text{CO}_2$
Combination of Iron and Sulfur
Code:
$\text{Fe} + \text{S} \rightarrow \text{FeS}$
Display:
$\text{Fe} + \text{S} \rightarrow \text{FeS}$
Tips for Writing Chemical Formulas

• Wrap element symbols with \text{} (e.g., \text{H})
• Use _ for subscripts (e.g., \text{H}_2 → $\text{H}_2$)
• Use \rightarrow for arrows (→)