Define two functions next to each other

alignmenthorizontal alignment

I want to define the following two functions:

\begin{align*}
    f_a:\mathbb{Q}[x,y]&\longrightarrow R_a\\
    x&\longmapsto x\\
    y&\longmapsto y\\
    xy&\longmapsto 0\\
\end{align*}
\begin{align*}
    f_b:\mathbb{Q}[x,y]&\longrightarrow R_b\\
    x&\longmapsto (x,x,x,\ldots)\\
    y&\longmapsto (y,y,y,\ldots)\\
    xy&\longmapsto (0,xy,xy,\ldots)\\
\end{align*}

However, rather than one being on top of the other, I would like them to be next to eachother. How can I do that?

Edit: I've tried using the gather environment, unsuccessfully

Best Answer

Rewrite this in one align* environment:

\documentclass{article}
\usepackage{amsmath, amssymb}

\begin{document}
    \begin{align*}
f_a:\mathbb{Q}[x,y] & \longrightarrow R_a
     &  f_b:\mathbb{Q}[x,y] & \longrightarrow R_b\\
%
x & \longmapsto x
    &   x & \longmapsto (x,x,x,\ldots)\\
%
y & \longmapsto y\
    &   y & \longmapsto (y,y,y,\ldots)\\  
%
xy & \longmapsto 0
    &   xy & \longmapsto (0,xy,xy,\ldots)\\
\end{align*}
\end{document}

enter image description here

Related Question