Okay, let's start with theAlignment

We're gonna use the following environment

\begin{array}

\end{array}

Here's an example

\begin{aligned}

a&=b\\

a^2&=ab\\

a^2-b^2&=ab-b^2\\

(a+b)(a-b)&=b(a-b)\\

a+b&=b\\

2b&=b\\

2&=1

\end{aligned}

As you can see, in each line, we put one "&" at the left side of the equal symbol.

At the end of each line, we put "\\" to start a new one.

Once done this, let's put the LaTeX's Tags and yields

$\displaystyle

\begin{aligned}

a&=b\\

a^2&=ab\\

a^2-b^2&=ab-b^2\\

(a+b)(a-b)&=b(a-b)\\

a+b&=b\\

2b&=b\\

2&=1

\end{aligned}

$

Implies & Iff

We all know that we can type \Longrightarrow to generate $\displaystyle \Longrightarrow$ & \Longleftrightarrow to generate $\displaystyle \Longleftrightarrow$. We can short this, replacing that commands by \implies & \iff, which both of them generate the same.

\frac

Sometimes, we wanna write \frac{1}{2} to generate $\displaystyle \frac12$, we can also short this, writing the following: \frac12. Which generates the same. Be careful, for letters we must leave one space, so for example to write $\displaystyle \frac ab$, it writes \frac ab.

Another thing about fractions are examples like this

$\displaystyle \frac{\dfrac{a+b}{a-b}}{x+y}$

When we write another \frac, it should be \dfrac, otherwise, we're gonna get $\displaystyle \frac{\frac{a+b}{a-b}}{x+y}$, which definitely is not nice.

--

To write limits, just put \lim_{x\to1}, or with letters \lim_{x\to a}.

Cases

To generate things like

$\displaystyle f(x)=|x|=\left\{\begin{array}{rr}x&\text{if }x\ge0\\

-x&\text{if }x<0\end{array}\right.$

was used the following environment

f(x)=|x|=\left\{\begin{array}{rr}x&\text{if }x\ge0\\

-x&\text{if }x<0\end{array}\right.

After the {array}, we have the {rr}, which means "right, right", this says how we want to align, we can also use {cr} which is "center, right", and many others.