\begin{flalign*} equation alignment

flalign

How can I align the blue texts?

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}

\begin{document}

\begin{flalign*}
&\color{red}f:x^2+y^2=4,\qquad \color{blue}f(3)=2&\\
&\color{red}g:x^2-y^2=2,\qquad \color{blue}g(4)=1&
\end{flalign*}

\end{document}

Best Answer

I suggest to use the fleqn environment from nccmath, which works somewhat like subequations, and the alignat* environment, which gives you full control on the spacing between the alignment columns:

\documentclass{article}
\usepackage{amsmath, nccmath}
\usepackage{xcolor}
\usepackage[showframe]{geometry}

\begin{document}

\mbox{}\bigskip
\begin{fleqn}
\begin{alignat*}{2}
\color{red}f:x^2+y^2 & =4, & \qquad\color{blue}f(3) & =2\\
\color{red}g:x^2-y^2 & =2, & \color{blue}g(4) & =1
\end{alignat*}
\end{fleqn}

\end{document} 

enter image description here

Related Question