Function Evaluation in LaTeX (f(x) = y)

f(x)=yf(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.

f(x)=y  ⟺  x=f−1(y)f(x) = y \iff x = f^{-1}(y)
\documentclass{article}
\begin{document}
Function Evaluation: $f(x) = y$

\[ f(x) = y \iff x = f^{-1}(y) \]
\end{document}

Related symbols

All الدوال والتعيين →

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.
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث