Codomain in LaTeX (\text{cod}(f))
- LaTeX command
\text{cod}(f)- Package
- Add to your preamble:
\usepackage{amsmath} - Mode
- Text and math mode
Where it is used
Codomain of f, the target set declared for the function's outputs.
In f\colon A \to B the codomain is B, which may be larger than the image; f is surjective exactly when \text{Im}(f) = \text{cod}(f). Category theory writes \operatorname{cod} f alongside \operatorname{dom} f for the target and source of a morphism. As with other text-based labels, \operatorname{cod} gives better spacing and avoids italic leakage inside theorem statements. Some authors spell out \operatorname{codom} for clarity. Distinguishing codomain from range matters, because some books use the word range to mean the codomain and others the image.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Codomain: $\text{cod}(f)$
\[ f \text{ is onto} \iff \text{Im}(f) = \text{cod}(f) \]
\end{document}Related symbols
- Range
\text{range}(f) - Domain
\text{dom}(f) - Hook Right Arrow
\hookrightarrow - Kernel
\ker(f) - Surjective
\twoheadrightarrow - Image
\text{Im}(f)
Frequently asked questions
- How do I write Codomain in LaTeX?
- Type \text{cod}(f) in math mode, for example $f \text{ is onto} \iff \text{Im}(f) = \text{cod}(f)$. Load amsmath first with \usepackage{amsmath}.
- Which package do I need for \text{cod}(f)?
- \text{cod}(f) needs amsmath: add \usepackage{amsmath} to your preamble before the document starts.
- Can I use \text{cod}(f) in text mode, or only in math mode?
- Both. \text{cod}(f) compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf
يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي
- أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
- ارفع صورة وحولها إلى LaTeX بسلاسة
- احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث