Questions tagged [math-mode]

{math-mode} is about typesetting mathematical content, e.g. tweaking the appearance of spacing and symbols in a formula, or producing specific mathematical constructs. For questions about "wrapper" environments like equation or align, consider the tag {equations}.

is about typesetting mathematical content, e.g. tweaking the appearance of spacing and symbols in a formula, or producing specific mathematical constructs.

For questions about "wrapper" environments like equation or align, consider using .

If you have questions about specific mathematical symbols, add and check out How to look up a symbol or identify a math symbol or character? first.

formula example

Tutorials and documentation

Useful packages

  • amsmath, the most important package for mathematics with LaTeX, fundamental for complex math documents
  • amsthm, environments for theorems, definitions and proofs
  • ntheorem, alternative theorem package, improved handling of endmarks
  • empheq, emphasizing formulas by color, frames or symbols
  • mathtools, some useful math extensions
  • cancel, strikeout expressions and formulas
  • amscd, commutative diagrams with amsmath
  • xypic, for construction of math diagrams

A selection of good questions

Special tags

External links and descriptions are taken from the TeXblog maths collection.

9697 questions
285
votes
4 answers

What is the "correct" way of embedding text into math mode?

Lets say I have something like: \[ Let x = number of cats \] (This is a contrived example, but pretend we are actually inside a long align environment block...) "Let" and "number of cats" need to be written like normal text, while x= needs to be…
Billy ONeal
  • 10,439
251
votes
4 answers

How to write ceil and floor in latex?

Is there a macro in latex to write ceil(x) and floor(x) in short form? The long form \left \lceil{x}\right \rceil is a bit lengthy to type every time it is used.
danny
  • 2,717
138
votes
3 answers

Using \colon or : in formulas?

I noticed that in many documents you encounter $f: X \to Y$ instead of $f \colon X \to Y$. Another example are quantified expressions: $\forall x: P (x)$ versus $\forall x \colon P(x)$. I find the \colon visually more pleasing, however I sometimes…
blubb
  • 1,711
131
votes
3 answers

How do I add a line break in display math mode?

For instance, how do I add a break after the first line in \[ a + b = c // what should I add here? a = c - b \]
David Faux
  • 4,117
131
votes
6 answers

How to make \left, \right pairs of delimiter work over multiple lines?

I have a very long equation that must be separated into two lines, and it has several pairs of nesting \left \right delimiters. Unfortunately, it seems that they need to be on the same line in order for them to work. Also I'm using the align…
sxu
  • 1,500
113
votes
2 answers

What is the difference between \mathbin vs. \mathrel?

These seem to be very similar as they both separate two operands. When would one be used over the other? Is there any difference in the math spacing surrounding them? How would the spacing in these relate to to the spacing produced by \mathop?
Nobby
  • 1,407
95
votes
2 answers

Difference between \textrm{} and \mathrm{}

Can you explain me what is the difference between \textrm{} and \mathrm{} when they are used in math mode. In what context one is preferred over the other?
Marco
  • 4,435
93
votes
1 answer

Formatting the union of sets

In the example $\cup^{i=1}_{\infty}F_i$ How do you get the i=1 directly below the union symbol and the infinity directly above?
Trajan
  • 1,113
74
votes
6 answers

Evaluation of Differentiation and Integration

I was having some thought about what would be the syntax to make the end point evaluation of derivatives or integrals. Such as making the | with the two end points of evaluation on the top an bottom of the line. Any suggestions would be wonderful.
night owl
  • 7,593
72
votes
7 answers

How to typeset function restrictions

I wonder how to typeset the restriction of a function to some subdomain, a la $f|_A$ or $f\restriction_A$ , but with the vertical bar being as big as possible.
Michael
  • 821
68
votes
3 answers

Differences between \stackrel and \stackbin

What are the differences between \stackrel and \stackbin? In what situations is it better to use one or the other?
Village
  • 13,603
  • 23
  • 116
  • 219
66
votes
2 answers

How do I write a recurring decimal in LaTeX?

Title says it all. Since I am a newbie, I don't know how to do this. Any help?
Zerium
  • 12,559
63
votes
8 answers

Is there a designated symbol for the negative sign in, say, -16?

I've been using -16 in my LaTeX code to write negative numbers. But the problem with that, is in many displays and LaTeX rendering kits, it displays the - sign as extremely long and separated from all the other mathematical symbols (e.g. the…
Zerium
  • 12,559
63
votes
3 answers

Which "bold" style is recommended for matrix notation?

I am wondering which "bold"-style is the "appropriate" or "official" way for matrix notation. E.g., let's say the matrix "A." \textbf{A} would result in a more italics representation compared\textbf{A}…
user34074
62
votes
3 answers

making a big summation sign

How can I make a big summation sign? ‎\begin{align}‎ ‎\cos x‎ ‎=‎ ‎‎\sum\limits‎_‎{n=0}^{‎\‎‎infty‎} ‎\frac{(ix)^{2n‎}}{(2n)!}‎‎ \end{align}‎ this is the code which I'm using for summation
Prelude
  • 4,242
1
2 3
76 77