The LaTeX command for mathcal M (ℳ) is \mathcal{M}.
\mathcal{M}Writing a paper? The table generator and the BibTeX cleaner are one click away, no account.
Write \mathcal{M} inside math mode, that is between $…$ for inline math or in a \[ … \] or equation block for display math. It is part of core LaTeX math, so no extra package is required.
\mathcal{M} is a math-mode symbol: in running text, wrap it in $...$. With unicode-math under XeLaTeX or LuaLaTeX, typing ℳ in a formula gives the same symbol.
Open this example in the live preview: it renders as you type, with no compiler and no signup.
\mathcal{H}\mathcal{F}\mathcal{A}\mathcal{B}\mathcal{C}\mathcal{D}\mathcal{G}\mathcal{N}\mathcal{P}\mathcal{R}\mathcal{S}\mathcal{T}\mathcal{X}\mathscr{A}More math symbols in LaTeX: the full table or search all 350+ LaTeX symbols.
Use \mathcal{M} in math mode; it needs no extra package. For example, $\mathcal{M}$.
None: \mathcal{M} is built into LaTeX, so no extra package is required.