# How do I indicate a line using MathJax?

I couldn't find this in the MathJax tutorial or through Google. Apologies if I missed it somewhere obvious.

Say I have two points $P_1$ and $P_2$ and I want to express the line defined by them. If I was writing, e.g. a geometry proof, I would write it like this:

<----->
P1P2


How do I write this in MathJax?

\overleftrightarrow{P_1P_2} produces $$\overleftrightarrow{P_1P_2}$$ There are also \overrightarrow{P_1P_2} and \overleftarrow{P_1P_2} that produce $$\overrightarrow{P_1P_2}\quad\text{and}\quad\overleftarrow{P_1P_2}$$ Without arrowheads, there is also \overline{P_1P_2} that produces $$\overline{P_1P_2}$$