After powers, fractions and roots are the shapes you will type most. Both are a command followed by braces, and both grow to fit whatever you put inside.
Fractions with \frac
\frac takes two pairs of braces: the top first, then the bottom. \frac{1}{2} gives , and \frac{a+b}{c} gives .
Everything on top goes in the first pair of braces and everything underneath in the second. Without braces, LaTeX takes one character for each part: \frac12 still gives , which you will see often, but \frac ab+c gives , with only the a and the b in the fraction. Writing the braces is never wrong.
Fractions inside fractions
A fraction can sit inside another one, top or bottom:
Inside a sentence, a fraction is drawn smaller so it fits the line, as in here. \dfrac keeps it full size, , and \tfrac makes it small anywhere. In a formula on its own line, \frac is already full size.
Slash fractions
Sometimes a fraction is better on one line: in a power, or in running text. Type a slash: a/b gives , and e^{x/2} gives , which is easier to read than a stacked fraction squeezed into the power.
Square roots with \sqrt
\sqrt{...} puts its contents under a root sign, and the sign stretches over all of it: \sqrt{2} gives , and \sqrt{x^2 + y^2} gives .
Other roots
For a cube root or any other, put the number in square brackets before the braces: \sqrt[3]{8} gives , and \sqrt[n]{x} gives .
Everything together
The quadratic formula uses all of it: a fraction, a square root, a power and \pm for plus or minus.
Practise
\frac{top}{bottom}.\frac{3}{4}The whole of
x+1goes in the first braces.\frac{x+1}{x-1}Three fractions, each with its own
\frac.\frac{1}{2} + \frac{1}{3} = \frac{5}{6}Everything under the root goes in the braces.
\sqrt{x^2 + y^2}The 3 of a cube root goes in square brackets:
\sqrt[3]{...}.\sqrt[3]{27} = 3A slash keeps the fraction on one line inside the power.
e^{x/2}A root inside the top of a fraction.
\frac{\sqrt{3}}{2}\pmgives ±, and the root sits in the top of the fraction.x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
In short
\frac{top}{bottom}makes a fraction, and fractions can sit inside each other.\dfrackeeps a fraction full size in a sentence; a slash keeps it on one line.\sqrt{...}makes a square root, and\sqrt[n]{...}any other.
Next, in lesson 4: Greek letters and the symbols that are not on your keyboard.