Provided you've loaded the
amsfonts packages, you can write something like
\right allows you to using grouping-like symbols and resize them to match the height of the material bracketed. In this case, you only have
| which is not paired with anything else. So we use
\left. to fill in for the missing grouping symbol.
\[...\], this is for displayed math expressions. It is currently preferred over
$$...$$ as it handles various spacing issues better, among other things.