# LaTeX fraction commands (frac, cfrac)

You can write fractions by the command \frac like $\frac{1}{3}$ or $\frac{\sqrt{5}}{3}$. These are alongside the text so numerators and denominators are relatively small. The following fractions are in display mode.

$\frac{1}{2}$


$\frac{1}{2}$

## Fit the left and right round brackets to fractions vertically

$3 (\frac{1}{2} + \frac{1}{2}) = 3 \\~\\ 3 \left( \frac{1}{2} + \frac{1}{2} \right) = 3$


$3 (\frac{1}{2} + \frac{1}{2}) = 3 \\~\\ 3 \left( \frac{1}{2} + \frac{1}{2} \right) = 3$

The round brackets are so small in the first equation. The left and right commands force the brackets to fit fractions vertically.

## Fraction in fraction

$\cfrac{ \cfrac{3}{2} }{ \cfrac{1}{2} } = 3 \\~\\ \frac{ \frac{3}{2} }{ \frac{1}{2} } = 3$


$\cfrac{ \cfrac{3}{2} }{ \cfrac{1}{2} } = 3 \\~\\ \frac{ \frac{3}{2} }{ \frac{1}{2} } = 3$