you can do both, the normal markdown way:
`$a$` squared is `$a^2$`, which is good to know for the pythagorean theorem:
```equation
a^2+b^2\eq c^2
```