How can I align multirow and multicolumn equations?

There is a multiline and multirow equation:

$$\begin{cases} f(x)=\frac{1}{12} \cdot x \quad g(x) = \frac{1}{24} \cdot x, & x<12 \\ f(x)=1 \quad g(x) = \frac{1}{8} \cdot x - 1, & 12 \le x < 16 \\ f(x)=1 \quad g(x) = 1, & x \ge 16 \end{cases}$$


The result is:

What I expect is: (align g(x) as well)

f(x)=*    g(x)=*
f(x)=*    g(x)=*
f(x)=*    g(x)=*


You'd probably need something like this (simple cases cannot handle this)

\documentclass[a4paper]{article}
\usepackage{amsmath}
\begin{document}

\left\{\begin{aligned} f(x)&=\tfrac{1}{12} \cdot r, & g(x) &= \tfrac{1}{24} \cdot x, & x&<12 \\ f(x)&=1, &g(x) &= \tfrac{1}{8} \cdot x - 1, & 12 &\le x < 16 \\ f(x)&=1, &g(x) &= 1, & x &\ge 16 \end{aligned} \right.

\end{document}


Here is the result:

• Why do u use \tfrac instead of \frac? Jul 8, 2015 at 8:38
• The fractions are the only tall things on the line. Since they are simple fractions, they are still perfectly readable in a smaller state. And thus I think it looks better. To me leaving them as \frac made them look pompous. Jul 8, 2015 at 8:43