Oh, the good old LaTeX formulas. Once upon a time, I was the unofficial TeX guy at university, now my son is learning the same stuff. And it is still the best quality layout you can get.
To add on to the other answers, in latex, \frac creates a fraction and the first curly braces after it turn into the numerator and the second into the denominator.