how to align this

I'm using this

\newcommand\Underset[2]{\underset{\textstyle #1}{#2}}


so that

\Underset{f \mapsto f\circ \partial_{n} }{\partial^{*}_{n}:Hom(G_{n-1},M)\to Hom(G_{n},M)}


wouldn't minimize the function under those sets, but now how do I align f under Hom and the row \mapsto under the row \to?

• Welcome to TeX SX! Could you please post a small compilable code? – Bernard May 18 '19 at 9:35

I'm not sure what you are looking for but, well, like this?

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\Hom}{Hom}
\begin{document}
\begin{align*}
\partial^{*}_{n}:\Hom(G_{n-1},M)&\to\Hom(G_{n},M)\\
f &\mapsto f\circ \partial_{n}
\end{align*}
\end{document}


• basically yes, but why do we need to define a math operator? I mean why \DeclareMathOperator{\Hom}{Hom} is needed in order to have an allingment – Davide Trono May 18 '19 at 9:50
• @DavideTrono It is not needed to have the alignment. However, it is needed overall. If you write only Hom, I will understand it as H x o x m, i.e. a product of three variables. \DeclareMathOperator makes it in roman font (which is needed) and produces a little space after the operator (which looks nice and is recommended). – user156344 May 18 '19 at 9:53