# Putting Multiline Conditional Equations

I am trying to write two equation like,

a=b      when a>1
a=c      when a=0


One obvious choice is putting all in a tabular construct, as,

\begin{tabular}{ll}
$a=b$ & \text{when $a\ge 1$}\\
$a=c$ & \text{ $when a=0$}
\end{tabular}


But, the spacing looks rather odd. I tried putting them in cases construct, but it is more suitable for conditional functions, as I am getting a brace at left.

So, what is the preferred way?

Three options using align* or aligned from the amsmath package:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
a &= b,\quad\text{when $a\ge 1$.}\\
a &= c,\quad\text{when $a=0$.}
\end{align*}

\begin{align*}
a &= b,&&\text{when $a\ge 1$.}\\
a &= c+e,&&\text{when $a=0$.}
\end{align*}

\begin{equation*}
\begin{aligned}
a &= b,&&\text{when $a\ge 1$.}\\
a &= c+e,&&\text{when $a=0$.}
\end{aligned}
\end{equation*}

\end{document}


In the first option, it's assumed that both math expressions on the right hand side have the same length; in the other options this is not necessary.

%\documentclass{article}% uncomment this line if you want to use article class
\documentclass[preview,border=12pt,varwidth]{standalone}% comment this line if you want to use other class

\usepackage{mathtools}
\begin{document}
\abovedisplayskip=0pt\relax% remove this line because it is used just for creating a screenshot like image file.
\begin{aligned} ax^2 + bx + c &= 0 && \text{when } a \ne 0\\ y &= mx + c && \text{when } m \ne 0 \end{aligned}
\end{document}