Actually basic rules of TeX notation are very simple.
To insert formula into the text it should be surrounded with $ signs:
text..
..text
If you want to obtain a formula on a separate string then it should be surrounded with $ signs:
text..
..text
Keywords begin with \. Functional keywords:
\int for integral
\sum for summation
\frac for fraction, etc (\sin, \log, \prod...)
Keywords for math. signs:
A \subset B - A is a subset of B
x \in A - x is an element of A
A \cap B - intersection of A and B
\delta, \phi, \lambda - Greek literals
etc., there are 100-200 signs
Sub- and superscripts:
keyword_subscript^superscript. For example
x^3 - x cubed,
\int_a^b - integral from a to b
Braces. Parts of formula, which are formulas themselves, should be surrounded with braces:
\sum_{i=1}^n - sum over i from 1 to n