Function Evaluation in LaTeX (f(x) = y)
- LaTeX command
f(x) = y- Package
- No package needed: built into LaTeX
- Mode
- Text and math mode
Where it is used
States that the function f sends the input x to the output value y.
The equation is the element-level reading of a function: y is the image of x, also written x \mapsto y. In algebra courses, solving f(x) = y for x is how inverse functions are found, giving x = f^{-1}(y). Spacing around = is automatic, so avoid adding manual spaces. For a list of values, align several equations with the align environment, putting & before each equals sign. When the function name has several letters, use \operatorname so it is not italic: \operatorname{relu}(x) = y rather than relu(x) = y.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Function Evaluation: $f(x) = y$
\[ f(x) = y \iff x = f^{-1}(y) \]
\end{document}Related symbols
- Piecewise Function
f(x) = \begin{cases} a & x > 0 \\ b & x \leq 0 \end{cases} - Restriction
f|_A - Left Right Arrow
\leftrightarrow - Surjective
\twoheadrightarrow - Hook Right Arrow
\hookrightarrow - Range
\text{range}(f)
Frequently asked questions
- How do I write Function Evaluation in LaTeX?
- Type f(x) = y in math mode, for example $f(x) = y \iff x = f^{-1}(y)$. It works in plain LaTeX without loading any package.
- Which package do I need for f(x) = y?
- None. f(x) = y is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use f(x) = y in text mode, or only in math mode?
- Both. f(x) = y compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Editor LaTeX AI Terbaik, Alternatif Overleaf
Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI
- Jana diagram TikZ yang cantik menggunakan AI
- Muat naik imej dan tukar ke LaTeX dengan lancar
- Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan