Two good resources for getting to learn LaTeX better are:

Getting Started with LaTeX
A not so short guide to LaTeX.
Also here are some questions that I have already answered about LaTeX:

I was trying to define a function, which had more than one possible output depending on its input and I couldn't find a nice way to show this other than using somehing like:
let f(x) = {}^{first possibility}_{second possibility}....
Is there another way to do this that is better, and will allow more than two possible outputs?

Here is an example of the |x| function,

\[ |x| = \left\{ \begin{array}{ll}
x & \mbox{if $x \geq 0$};\\
-x & \mbox{if $x < 0$}.\end{array} \right. \]


You can see what it looks like at:

http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Matrices.html

So you can just put f(x) for |x| and the values in for x and -x. If you have to add a third line, add a \\ and move \end{array} down a line. Then put in your value followed by a &.

So, an example of a three valued function is
\[ |x| = \left\{ \begin{array}{ll}
x & \mbox{if $x > 0$};\\
-x & \mbox{if $x < 0$};\\
0 & \mbox{if $x=0$}. \end{array} \right. \]

(\mbox{ } allows for normal spaced text when you are in mathematics mode.)