# Mathematics Documentation in Latex

Writing mathematics in Latex seems to be a bit difficult at first. However, here I compiled a short summary on how you can write good mathematical expressions easily with examples.

I am assuming, you already know some basics how to write basic equations. Here, I show you how you can present and document it in well manner.

If you are new to Latex, this post might be helpful for you. Check Latex Resources in a Nutshell.

## Environments

### Within Paragraph/Texts

1. Use  for mathematical expressions inside text. For example, $x^2 + y^2 = z^2$ will look like $x^2 + y^2 = z^2$.

2. You can also use parenthesis for equations inside text. For example, $$x^2 + y^2 = z^2$$ will look like $x^2 + y^2 = z^2$ in the output document.

### Outside Paragraph/Texts

1. Use $$...$$ to write equations. Put your mathematical symbols within this environment and it will add an equation number as well.
% With equation number
$$x^2 + y^2 = z^2$$


To avoid equation number, use \begin{equation*}...\end{equation*}

% Without equation number
$$x^2 + y^2 = z^2$$

2. Aligning equations is one of my favorite option and it can be done using \begin{align*}...\end{align*}. We actually use it to align several equations.
\usepackage{amsmath}
\begin{align*}
x^2 + y^2 &= z^2 \\
x^3 + y^3 &= z^3
\end{align*}


Here, & helps to keep the equations aligned. Use \\ for newline. Or, you can use \begin{multline*}...\end{multline*}.

\begin{multline*}
f(x) = (a^2 + b^2 + c^2 + d^2 + e^2 + f^2)\\
-(g^2 + h^2 + i^2 + j^2)
\end{multline*}

3. You can also simply use $...$ and put mathematical expressions within this.
$x^2 + y^2 = z^2$


## Mathematics Symbols in Latex

You can find all necessary Latex commands in the following link-

As this is a public document, I embed here for your convenience.

## Example Equations

Please check this Overleaf Document to find real different examples related to general equations, matrix, and calculus.

Tags:

Categories:

Updated: