# Latex Basics

Syntax for parts of Latex that I tend to use the most.

# Inline Equations

To specify an equation *inline* (i.e. in the same line as your text), simply surround the equation with `$$`

.

Code:

```
My equation is $$ y = 8x $$ and I'm proud of it!
```

Output:

My equation is and I’m proud of it!

# Next Line Equation

To specify an equation in the next line (in the center of the line), add a `\`

in front of the first `$$`

, i.e. `\$$`

:

Code:

```
This equation will appear in the next line, in the center: \$$ y = 3x $$.
```

Output:

This equation will appear in the next line, in the center: $$ y = 3x $$

# Subscript

Code:

```
x_1
```

Output:

Multi-letter subscript, Code:

```
x_{1d}
```

Output:

# Fraction

Code:

```
\frac{topExpression}{bottomExpression}
```

Output:

# Vector

Code:

```
\vec{a}
```

Output:

# Sum

Code

```
\sum_{n}
```

Output:

## Sum With Top Bound

Code

```
\sum_{n=1}^3
```

Output:

## Dot product

Code (`\cdot`

)

```
\vec{a} \cdot \vec{b}
```

Output: