1

I'm a little bit of a rookie in using latex. I want to define a function using latex and I'm struggling trying to do that, the function is :

f:A->A
  x->(f1(x),f2(x))

I've tried something but I know it's definitely not correct. Can you help me please?

$f$ : $B_k$ $\longrightarrow$ $B_k$\\
      $x$ &\mapsto$  f\(f_1\(x),f_2(x)\)
Bernard
  • 271,350
Ali Az
  • 35

2 Answers2

2

I would not use an aligned approach in an inline set. Here is something your can work with:

\documentclass{memoir}
\usepackage{amsmath}
\begin{document}
Let us consider the function
\begin{align*}
    f\colon A   &\to A,\\
        x       &\mapsto \big(f_1(x), f_2(x)\big). 
\end{align*}
Saepe at quas accusamus molestiae possimus consequatur vitae. 
For an inline attempt, I would go with 
$f\colon A \to A,\, x \mapsto \big(f_1(x), f_2(x)\big)$. 
Saepe at quas accusamus molestiae possimus consequatur vitae.
\end{document}

enter image description here

Seriously, you should consider some basic training in TeX, for example https://ctan.org/pkg/lshort-english, https://ctan.org/pkg/short-math-guide or https://ctan.org/pkg/latex-amsmath.

CampanIgnis
  • 4,624
2

You can use this, if it's in-line maths:

 $\begin{aligned}[t] f\colon A &\longrightarrow A\\
                             x &\longmapsto \bigl(f_1(x),f_2(x)\bigr)
  \end{aligned}$

If it is a displayed equation, use \begin{align*} ... \end{align*} in the place of $\begin{aligned}[t] ... \end{aligned}$

Bernard
  • 271,350