# Equation not showing

I used the following code in overleaf but it isn't showing the requisite result. Any comments?

Let us label the two sides as A and B, and then define:

$$a_{_{i}}(t)= \begin{cases} & 1, \text{ if side A is chosen} \\ & (-1), \text{ if side B is chosen} \end{cases}$$

• Do you really have blank lines in the input or is this just a by-product of the edit? And what's the problem? What's the required result like and what are you getting? No blank lines, a_{_i} should be a_{i} and there should be & before \text. – egreg Oct 2 '17 at 13:07
• @egreg The & before \text would only make sense if $$...$$ would be replaced with \begin{align}...\end{align}, or alternatively \begin{split}...\end{split} would be used within the equation-environment, wouldn't it!? – Manuel Weinkauf Oct 2 '17 at 13:44
• @ManuelWeinkauf No, the & and \\ is inside a cases environment. – Torbjørn T. Oct 2 '17 at 17:25

Did you \usepackage{amsmath}?
\documentclass{article}
$$a_{_{i}}(t)= \begin{cases} & 1, \text{ if side A is chosen} \\ & (-1), \text{ if side B is chosen} \end{cases}$$