LaTeX

How to Write Trigonometric Functions in LaTeX

Format sine, cosine, tangent, inverse functions, powers, and angle units correctly in LaTeX.

Updated 2026-07-27 · Reviewed 2026-07-26 by Chevee Math Tools

Quick answer

Use the semantic LaTeX structure shown below instead of arranging individual Unicode characters with spaces.

\sin^2\theta+\cos^2\theta=1

Use named operators such as \sin, not italic letter sequences like sin.

Build the expression

  1. Start with the outer structure: operator, environment, delimiter, or relation.
  2. Put complete multi-token arguments inside braces.
  3. Add limits, scripts, conditions, and text labels only after the structure renders correctly.
  4. Preview the expression in the same renderer or document class used for publication.

Working example

The source \sin^2\theta+\cos^2\theta=1 keeps the mathematical grouping explicit. Copy it into the LaTeX editor, change one component at a time, and compare the rendered result after every structural edit.

Common errors

  • Using spaces to simulate alignment instead of an environment designed for alignment.
  • Omitting braces around a numerator, denominator, limit, index, or exponent containing several tokens.
  • Typing the name of a mathematical operator as ordinary italic letters.
  • Copying only the rendered result and losing the editable source.

Portability checks

Keep a minimal test expression beside the full document. Compile with the intended packages, reopen the exported PDF, and verify line breaks, numbering, fonts, copy-and-paste behavior, and alternative text where required.

Build a minimal test before the full expression

For trigonometric functions latex, start with the smallest source that contains the required command or environment. Render it with the same engine used by the final document, then add bounds, labels, alignment, and surrounding text one change at a time. This makes a missing brace, unsupported package, or environment error easy to isolate.

% Minimal test: keep only the structure being checked
\[ x^2 + y^2 = z^2 \]

Verify structure rather than appearance

  1. Confirm that every multi-token argument is grouped with braces.
  2. Check that operators, limits, and text labels use semantic commands rather than manual spacing.
  3. Compile with the intended packages and document class.
  4. Copy from the exported result and confirm that the editable source remains available.

Portability boundary

A command that works in a full TeX distribution may not work in KaTeX, MathJax, Word, or a Markdown renderer. Keep a fallback expression and record any required package. Convert to MathML only after the LaTeX structure is correct; conversion cannot recover semantics that were omitted from the source.

Put this guide into practice

Continue with a browser tool

Use the related reference or tool while the notation and workflow are still fresh.

How this guide was checked

Review method: Intent alignment review, notation/source verification, worked-example check, cross-format rendering review, and duplicate-content comparison for How to Write Trigonometric Functions in LaTeX

Verified against: Official standards, primary documentation, and the page-specific sources listed below

What changed: Removed repeated sitewide boilerplate and added content-type-specific decision, verification, and applicability guidance for this exact task.

Page purpose: trigonometric functions latex — Understand and apply the topic in mathematical or scientific writing

Automated quality check: Passed critical indexing checks.

Verification references

These primary standards and official documentation pages were used to check character identity, syntax, or platform behavior described above.

Reuse, attribution, and correction

Share this reference without losing its source

Copy a citation, permanent link, Markdown link, or self-contained embed card. Each reusable format points readers back to the maintained canonical page.

Report an issue

Search the whole reference

Symbols, formulas, guides, tools and commands

Start typing to search.

move · Enter open · Esc close