* TIME: 2023-08-01 15:30:55 * URL: ----- #### Stack Exchange Network Stack Exchange network consists of 183 Q&A communities including [Stack Overflow](https://stackoverflow.com), the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. [Visit Stack Exchange](https://stackexchange.com) Loading… 1. [](/help "Help Center and other resources") * [ Back to Mathematics Stack Exchange Return to the main site ](https://math.stackexchange.com) * [ Tour Start here for a quick overview of the site ](/tour) * [ Help Center Detailed answers to any questions you might have ](/help) * [ What's Meta? How Meta is different from the main site ](/help/whats-meta) * [ About Us Learn more about Stack Overflow the company, and our products. ](https://stackoverflow.co/) 2. [ ](https://stackexchange.com "A list of all 183 Stack Exchange sites") 3. ### [current community](https://math.meta.stackexchange.com) * [ Mathematics ](https://math.stackexchange.com) [help](https://math.meta.stackexchange.com/help) [chat](https://chat.stackexchange.com?tab=site&host=math.stackexchange.com) * [ Mathematics Meta ](https://math.meta.stackexchange.com) ### your communities [Sign up](http://math.meta.stackexchange.com/users/signup?ssrc=site_switcher&returnurl=https%3a%2f%2fmath.meta.stackexchange.com%2fquestions%2f5020%2fmathjax- basic-tutorial-and-quick-reference) or [log in](http://math.meta.stackexchange.com/users/login?ssrc=site_switcher&returnurl=https%3a%2f%2fmath.meta.stackexchange.com%2fquestions%2f5020%2fmathjax- basic-tutorial-and-quick-reference) to customize your list. ### [more stack exchange communities](https://stackexchange.com/sites) [company blog](https://stackoverflow.blog) 4. 5. [Log in](https://math.stackexchange.com/users/login?ssrc=head&returnurl=https%3a%2f%2fmath.meta.stackexchange.com%2fquestions%2f5020%2fmathjax-basic-tutorial-and-quick-reference) 6. [Sign up](https://math.stackexchange.com/users/signup?ssrc=head&returnurl=https%3a%2f%2fmath.meta.stackexchange.com%2fquestions%2f5020%2fmathjax-basic-tutorial-and-quick-reference) [ ![Mathematics](https://cdn.sstatic.net/Sites/mathmeta/Img/logo.svg?v=8775dc11dad2) ](https://math.meta.stackexchange.com) 1. [ Home ](/) 2. 1. Public 2. [ Questions ](/questions) 3. [ Tags ](/tags) 4. [ Users ](/users) 5. [ Unanswered ](/unanswered) 3. Teams **Stack Overflow for Teams** – Start collaborating and sharing organizational knowledge. ![](https://cdn.sstatic.net/Img/teams/teams-illo-free-sidebar- promo.svg?v=47faa659a05e) [Create a free Team](https://try.stackoverflow.co/why-teams/?utm_source=so- owned&utm_medium=side-bar&utm_campaign=campaign-38&utm_content=cta) [Why Teams?](https://stackoverflow.co/teams/) 4. Teams [ ](javascript:void\(0\)) 5. [ Create free Team ](https://stackoverflowteams.com/teams/create/free/?utm_source=so-owned&utm_medium=side-bar&utm_campaign=campaign-38&utm_content=cta "Stack Overflow for Teams is a private, secure spot for your organization's questions and answers.") **Teams** Q&A for work Connect and share knowledge within a single location that is structured and easy to search. [ Learn more about Teams ](https://stackoverflow.co/teams/) # [MathJax basic tutorial and quick reference](/questions/5020/mathjax-basic- tutorial-and-quick-reference) [ Ask Question ](/questions/ask) Asked 10 years, 11 months ago Modified [3 months ago](?lastactivity "2023-04-06 07:20:57Z") Viewed 1.6m times This question shows research effort; it is useful and clear 3910 This question does not show any research effort; it is unclear or not useful Save this question. [](/posts/5020/timeline) Show activity on this post. (Deutsch: [MathJax: LaTeX Basic Tutorial und Referenz](https://www.mathelounge.de/509545/mathjax-latex-basic-tutorial-und- referenz-deutsch)) To see how any formula was written in any question or answer, including this one, right-click on the expression and choose "Show Math As > TeX Commands". (When you do this, the '$' will not display. Make sure you add these: see the next point. There are also [other ways](/questions/659/how-to-view-latex- source-of-equations) to view the code for the formula or the whole post.) 1. **For inline formulas, enclose the formula in`$`…`$`. For displayed formulas, use `$$`…`$$`.** * These render differently. For example, type the following to show _inline_ mode: `$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$` ∑ni=0i2=(n2+n)(2n+1)6∑ni=0i2=(n2+n)(2n+1)6 * or type the following for display mode: `$$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$` n∑i=0i2=(n2+n)(2n+1)6 ∑i=0ni2=(n2+n)(2n+1)6 2. For **Greek letters** , use `\alpha`, `\beta`, …, `\omega`: αα, ββ, …, ωω. * For uppercase letters, use `\Gamma`, `\Delta`, …, `\Omega`: ΓΓ, ΔΔ, …, ΩΩ. * For other Greek capital letters, use Latin `$A,`, `B`, `E$` and so on: A,B,EA,B,E. * Some Greek letters have variant forms: `\epsilon \varepsilon` ϵϵ, εε, `\phi \varphi` ϕϕ, φφ, and others. 3. For **superscripts and subscripts** , use `^` and `_`. For example, `x_i^2`: x2ix2i, `\log_2 x`: log2xlog2x. 4. **Groups**. Superscripts, subscripts, and other operations apply only to the next “group”. A “group” is either a single symbol, or any formula surrounded by curly braces `{`…`}`. * If you do `10^10`, you will get a surprise: 10101010. But `10^{10}` gives what you probably wanted: 10101010. * Use curly braces to delimit a formula to which a superscript or subscript applies: `x^5^6` is an error; `{x^y}^z` is xyzxyz, and `x^{y^z}` is xyzxyz. Observe the differences between `x_i^2` x2ix2i, `x_{i^2}` xi2xi2 and `{x_i}^2` xi2xi2. 5. **Parentheses** Ordinary symbols `()[]` make parentheses and brackets (2+3)[4+4](2+3)[4+4]. Use `\{` and `\}` for curly braces {}{}. * These do _not_ scale with the formula in between, so if you write `(\frac{\sqrt x}{y^3})` the parentheses will be too small: (√xy3)(x√y3). Using `\left(`…`\right)` will make the sizes adjust automatically to the formula they enclose: `\left(\frac{\sqrt x}{y^3}\right)` is (√xy3)(x√y3). * `\left` and`\right` apply to all the following sorts of parentheses: `(` and `)` (x)(x), `[` and `]` [x][x], `\{` and `\}` {x}{x}, `|` |x||x|, `\vert` |x||x|, `\Vert` ‖x‖∥x∥, `\langle` and `\rangle` ⟨x⟩⟨x⟩, `\lceil` and `\rceil` ⌈x⌉⌈x⌉, and `\lfloor` and `\rfloor` ⌊x⌋⌊x⌋. `\middle` can be used to add additional dividers. There are also invisible parentheses, denoted by `.`: use `\left.x^2\right\rvert_3^5 = 5^2-3^2` to get x2|53=52−32 x2∣∣53=52−32 6. **Sums and integrals** `\sum` and `\int`; the subscript is the lower limit and the superscript is the upper limit, so for example `\sum_1^n` ∑n1∑n1. Don't forget `{`…`}` if the limits are more than a single symbol. For example, `\sum_{i=0}^\infty i^2` is ∑∞i=0i2∑∞i=0i2. * Similarly, `\prod` ∏∏, `\int` ∫∫, `\bigcup` ⋃⋃, `\bigcap` ⋂⋂, `\iint` ∬∬, `\iiint` ∭∭, `\idotsint` ∫⋯∫∫⋯∫. 7. **Fractions** There are [three ways to make fractions](/questions/12978/should-dfrac-be-edited-in). `\frac ab` applies to the next two groups, and produces abab; for more complicated numerators and denominators use `{`…`}`: `\frac{a+1}{b+1}` is a+1b+1a+1b+1. * If the numerator and denominator are complicated, you may prefer `\over`, which splits up the group that it is in: `{a+1\over b+1}` is a+1b+1a+1b+1. * For continued fractions, [use `\cfrac` instead of `\frac`](/questions/5020/mathjax-basic-tutorial-and-quick-reference/5058#5058). 8. **Fonts** * Use `\mathbb` or `\Bbb` for "blackboard bold": CHNQRZCHNQRZ. * Use `\mathbf` for boldface: CHNQRZCHNQRZ chnqrzchnqrz. * For expression based characters, use `\boldsymbol` instead: α * Use `\mathit` for italics: CHNQRZ chnqrz. * Use `\pmb` for boldfaced italics: CHNQRZCHNQRZ chnqrzchnqrz. * Use `\mathtt` for "typewriter" font: CHNQRZ chnqrz. * Use `\mathrm` for roman font: CHNQRZ chnqrz. * Use `\mathsf` for sans-serif font: CHNQRZ chnqrz. * Use `\mathcal` for "calligraphic" letters: CHNQRZ (Uppercase only.) * Use `\mathscr` for script letters: CHNQRZ chnqrz * Use `\mathfrak` for "Fraktur" (old German style) letters: CHNQRZ chnqrz. 9. **Radical signs / roots** Use `sqrt`, which adjusts to the size of its argument: `\sqrt{x^3}` √x3; `\sqrt[3]{\frac xy}` 3√xy. For complicated expressions, consider using `{...}^{1/2}` instead. 10. Some **special functions** such as "lim", "sin", "max", "ln", and so on are normally set in roman font instead of italic font. Use `\lim`, `\sin`, etc. to make these: `\sin x` sinx, not `sin x` sinx. Use subscripts to attach a notation to `\lim`: `\lim_{x\to 0}` limx→0 Nonstandard function names can be set with `\operatorname{foo}(x)` foo(x). 11. There are a very large number of **special symbols and notations** , too many to list here; see the short listing [LATEX and AMS-LATEX Symbols](https://pic.plover.com/MISC/symbols.pdf) prepared by Dr. Emre Sermutlu, or the exhaustive listing [The Comprehensive LATEX Symbol List](https://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf) by Scott Pakin. Some of the most common include: * `\lt \gt \le \ge \neq` <, >, ≤, ≥,≠. You can use `\not` to put a slash through almost anything: `\not\lt` ≮ but it often looks bad. * `\times \div \pm \mp` ×, ÷, ±, ∓. `\cdot` is a centered dot: x⋅y * `\cup \cap \setminus \subset \subseteq \subsetneq \supset \in \notin \emptyset \varnothing` ∪, ∩, ∖, ⊂, ⊆, ⊊, ⊃, ∈, ∉, ∅, ∅ * `{n+1 \choose 2k}` or `\binom{n+1}{2k}` (n+12k) * `\to \gets \rightarrow \leftarrow \Rightarrow \Leftarrow \mapsto \implies \iff` →, ←, →, ←, ⇒, ⇐, ↦, ⟹, ⟺ * `\land \lor \lnot \forall \exists \top \bot \vdash \vDash` ∧, ∨, ¬, ∀, ∃, ⊤, ⊥, ⊢, ⊨ * `\star \ast \oplus \circ \bullet` ⋆, ∗, ⊕, ∘, ∙ * `\approx \sim \simeq \cong \equiv \prec \lhd` ≈, ∼, ≃, ≅, ≡, ≺, ⊲ * `\infty \aleph_0` ∞ℵ0 `\nabla \partial` ∇, ∂ `\Im \Re` ℑ, ℜ * For modular equivalence, use `\pmod` like this: `a\equiv b\pmod n` a≡b(modn). For the binary mod operator, use `\bmod` like this: `a\bmod 17` amod17. * Use `\dots` for the triple dots in a1,a2,…,an and a1+a2+⋯+an * Script lowercase l is `\ell` ℓ. [Detexify](https://detexify.kirelabs.org/classify.html) lets you draw a symbol on a web page and then lists the TEX symbols that seem to resemble it. These are not guaranteed to work in MathJax, but it's a good place to start. To check that a command is supported, note that MathJax.org maintains a [list of currently supported LATEX commands](https://docs.mathjax.org/en/latest/input/tex/macros/index.html), and one can also check Dr. Carol JVF Burns's page of [TEX Commands Available in MathJax](https://www.onemathematicalcat.org/MathJaxDocumentation/TeXSyntax.htm). 12. **Spaces** MathJax usually decides for itself how to space formulas, using a complex set of rules. Putting extra literal spaces into formulas will not change the amount of space MathJax puts in: `a␣b` and `a␣␣␣␣b` are both ab. To add more space, use `\,` for a thin space ab; `\;` for a wider space ab. `\quad` and `\qquad` are large spaces: ab, ab. To set plain text, use `\text{…}`: {x∈s∣x is extra large}. You can nest `$…$` inside of `\text{…}`, for example to access spaces. 13. **Accents and diacritical marks** Use `\hat` for a single symbol ˆx, `\widehat` for a larger formula ^xy. If you make it too wide, it will look silly. Similarly, there are `\bar` ˉx and `\overline` ¯xyz, and `\vec` →x and `\overrightarrow` →xy and `\overleftrightarrow` ↔xy. For dots, as in ddxx˙x=˙x2+x¨x, use `\dot` and `\ddot`. 14. Special characters used for MathJax interpreting can be escaped using the `\` character: \$ $, `\{` {, `\}` }, `\_` _, `\#` #, `\&` &. If you want `\` itself, you should use `\backslash` (symbol) or `\setminus` ([binary operation](https://tex.stackexchange.com/questions/511328/difference-between-commands-setminus-and-backslash/511332#511332)) for ∖, because `\\` is for a new line. (Tutorial ends here.) * * * It is important that this note be reasonably short and not suffer from too much bloat. To include more topics, please create short addenda and post them as answers instead of inserting them into this post. ## Contents Alphabetical list of links to MathJax topics, by title: * [Absolute values and norms](/questions/5020/mathjax-basic-tutorial-and-quick-reference/15078#15078) • [Additional symbolic decorations](/questions/5020/mathjax-basic-tutorial-and-quick-reference/13081#13081) • [Aligning Equations](/questions/5020/mathjax-basic-tutorial-and-quick-reference/5024#5024) * [Alternative Ways of Writing in LaTeX](/questions/5020/mathjax-basic-tutorial-and-quick-reference/27910#27910) • [Annotations of reasoning](/questions/5020/mathjax-basic-tutorial-and-quick-reference/21258#21258) • [Arbitrary operators](/questions/5020/mathjax-basic-tutorial-and-quick-reference/15077#15077) * [Arrays](/questions/5020/mathjax-basic-tutorial-and-quick-reference/5044#5044) • [Big braces](/questions/5020/mathjax-basic-tutorial-and-quick-reference/11423#11423) • [Colors](/questions/5020/mathjax-basic-tutorial-and-quick-reference/10116#10116) * [Commutative diagrams](/questions/5020/mathjax-basic-tutorial-and-quick-reference/16888#16888) • [Continued fractions](/questions/5020/mathjax-basic-tutorial-and-quick-reference/5058#5058) • [Crossing things out](/questions/5020/mathjax-basic-tutorial-and-quick-reference/13183#13183) * [Definitions by cases (piecewise functions)](/questions/5020/mathjax-basic-tutorial-and-quick-reference/5025#5025) • [Degree symbol](/questions/5020/mathjax-basic-tutorial-and-quick-reference/19678#19678) • [Display style](/questions/5020/mathjax-basic-tutorial-and-quick-reference/25054#25054) * [Equation numbering](/questions/5020/mathjax-basic-tutorial-and-quick-reference/27793#27793) • [Fussy spacing issues](/questions/5020/mathjax-basic-tutorial-and-quick-reference/5057#5057) • [Highlighting expressions](/questions/5020/mathjax-basic-tutorial-and-quick-reference/22395#22395) * [Left and right arrows](/questions/5020/mathjax-basic-tutorial-and-quick-reference/13310#13310) • [Limits](/questions/5020/mathjax-basic-tutorial-and-quick-reference/12850#12850) • [Linear programming](/questions/5020/mathjax-basic-tutorial-and-quick-reference/27756#27756) * [Long division](/questions/5020/mathjax-basic-tutorial-and-quick-reference/21096#21096) • [Math Programming](/questions/5020/mathjax-basic-tutorial-and-quick-reference/27756#27756) • [Matrices](/questions/5020/mathjax-basic-tutorial-and-quick-reference/5023#5023) * [Markov Chains](/questions/5020/mathjax-basic-tutorial-and-quick-reference/31141#31141) • [Mixing code and MathJax formatting on lines](/questions/5020/mathjax-basic-tutorial-and-quick-reference/25251#25251) • [The \newcommand function](/questions/5020/mathjax-basic-tutorial-and-quick-reference/11638#11638) * [Numbering Equations](/questions/5020/mathjax-basic-tutorial-and-quick-reference/11491#11491) • [Overlaying Symbols](/questions/5020/mathjax-basic-tutorial-and-quick-reference/32210#32210) • [Packs of cards](/questions/5020/mathjax-basic-tutorial-and-quick-reference/22516#22516) * [Symbols](/questions/5020/mathjax-basic-tutorial-and-quick-reference/11284#11284) • [System of equations](/questions/5020/mathjax-basic-tutorial-and-quick-reference/6267#6267) • [Tables](/questions/5020/mathjax-basic-tutorial-and-quick-reference/29979#29979) * [Tags and references](/questions/5020/mathjax-basic-tutorial-and-quick-reference/11491#11491) • [Tensor indices](/questions/5020/mathjax-basic-tutorial-and-quick-reference/30661#30661) • [Units](/questions/5020/mathjax-basic-tutorial-and-quick-reference/27212#27212) * [Vertical bars](/questions/5020/mathjax-basic-tutorial-and-quick-reference/35103#35103) • [Vertical spacing](/questions/5020/mathjax-basic-tutorial-and-quick-reference/25048#25048) * [support](/questions/tagged/support "show questions tagged 'support'") * [faq](/questions/tagged/faq "show questions tagged 'faq'") * [mathjax](/questions/tagged/mathjax "show questions tagged 'mathjax'") * [reference](/questions/tagged/reference "show questions tagged 'reference'") [Share](/q/5020 "Short permalink to this question") Share a link to this question Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this question to receive notifications [edited Mar 21 at 3:23](/posts/5020/revisions "show all edits to this post") community wiki [ 113 revs, 57 users 33% ](/posts/5020/revisions "show revision history for this post")[MJD](/users/25554) 81 * 37 Some capital Greek letters are the same as the Roman equivalents, so they are not separated in LATEX. For a capital beta, one must use something like `\mathrm{B}`: B – [robjohn](/users/13854/robjohn "338,820 reputation") Mod Aug 28, 2012 at 2:06 * 10 Two related questions: [How do I insert a table when asking a question?](http://meta.math.stackexchange.com/questions/4240/how-do-i-insert- a-table-when-asking-a-question/) and [How to show the integral symbol on this site?](http://meta.math.stackexchange.com/questions/4497/how-to-show-the- integral-symbol-on-this-site/) – [Martin Sleziak](/users/8297/martin-sleziak "52,209 reputation") Aug 28, 2012 at 13:26 * 35 A quick addition to point 11: If you want to use a sin-like symbol that is not already defined, the command is `\operatorname`: e.g., `\operatorname{Spec} A` gives SpecA. – [Charles Staats](/users/455/charles-staats "1,636 reputation") Aug 28, 2012 at 16:45 * 22 It might be useful to mention hanging subscripts for things like `_5C_3` 5C3. You could also mention `\frac` vs `\dfrac`. – [axblount](/users/34700/axblount "2,266 reputation") Aug 29, 2012 at 18:09 * 8 My basic idea is that if a beginner can express a formula clearly, then someone else can come in and clean up the typesetting afterwards. I am considering getting rid of the section about `\big`, `\left`, and `\right` for this reason, and trimming the section on spacing. – [MJD](/users/25554/mjd "64,093 reputation") Aug 30, 2012 at 2:06 * 9 Most of the references to TeX or LaTeX in this and the answers ought to be to MathJaX (the exception that I can see being the output of Detexify). I know this is a bit pedantic, but would it be alright to correct this? – [Andrew Stacey](/users/2907/andrew-stacey "3,163 reputation") Sep 11, 2012 at 14:13 * 5 @AndrewStacey Thanks for pointing this out. Let's by all means be as correct as possible, particularly when there's no extra cost. – [MJD](/users/25554/mjd "64,093 reputation") Sep 11, 2012 at 14:15 * 4 @MJD Okay, I've had a go (also the answer about arrays). I wonder also whether or not it is worth a sentence at the end pointing out that whilst MathJaX does its best to emulate TeX, it isn't TeX and so while knowing how something is done in TeX gives you a starting point, it isn't a guarantee that the same thing works in MathJaX. (As a case in point, questions about MathJaX are generally _off-topic_ over on TeX-SX.) – [Andrew Stacey](/users/2907/andrew-stacey "3,163 reputation") Sep 11, 2012 at 14:22 * 6 @AndrewStacey I wouldn't. They are close enough that it seems to me to be a needless refinement. I might even argue that MathJax _is_ TEX, although an alternative implementation. We're willing to accept that other programming languages (JavaScript, for example) that have slightly incompatible implementations are nevertheless the same language; why not in this case as well? – [MJD](/users/25554/mjd "64,093 reputation") Sep 11, 2012 at 14:35 * 11 @MJD Except that this is meant as a tutorial for those who aren't familiar with the distinction (and there really is a distinction: "slightly incompatible implementations" doesn't really fit the bill here). One thing tutorials often include is a "Where to find out more" section. This doesn't. Someone who doesn't know the distinction might be tempted to search for help on TeX or LaTeX instead and wonder why it doesn't work. – [Andrew Stacey](/users/2907/andrew-stacey "3,163 reputation") Sep 11, 2012 at 14:40 * 6 @AndrewStacey All the tips given here would work in any TEX/LATEX environment with the proper packages. MathJax is just the service used to render it. You wouldn't say "Miktex tutorial" or "texlive tutorial". – [axblount](/users/34700/axblount "2,266 reputation") Sep 11, 2012 at 15:01 * 6 @axblount But that's precisely the wrong way around to think about it! The likelihood is that someone will look at this tutorial to figure out how to write something on the Maths-SX site: i.e., to use MathJaX. If they can't find help here, where do they go? If they have the idea that MathJaX is "just a javascript implementation of TeX" then they might think to look for help with TeX, but that is quite possibly _not_ going to be helpful. – [Andrew Stacey](/users/2907/andrew-stacey "3,163 reputation") Sep 11, 2012 at 15:08 * 9 @axblount For a start, you've changed the goalposts: "LaTeX **math** expressions". LaTeX is so much more than just a way of typesetting maths! Second, I don't really know but it wouldn't take me long to cook one up. I don't use MathJaX so I haven't explored it. But I know, for example, that it can't handle catcode changes. Which means that I can't make `(` and `)` _automatically_ resizeable. I can in LaTeX. – [Andrew Stacey](/users/2907/andrew-stacey "3,163 reputation") Sep 11, 2012 at 16:04 * 87 I wish I saw this post when I first joined. This post should be a main link on the home page. There should be a button under each box: NEW TO LATEX, CLICK HERE FOR EXAMPLES. This is extremely useful, concise. – [user1527227](/users/73163/user1527227 "1,728 reputation") May 31, 2013 at 18:09 * 16 @MJD: I use `\mathrm` in many places; e.g. dx in integrals and derivatives and for operator names that don't need the full force of `\operatorname`. `\mathrm` was intended for roman symbols in math mode; `\text` was intended for text because of the way it spaces things. See [this TEX thread](http://tex.stackexchange.com/q/19502). Since I don't believe we can use preambles in MathJax, we can't use `\DeclareMathOperator`, though we can use `\newcommand`, but that is orthogonal to the use of `\mathrm` vs `\text` for math symbols. – [robjohn](/users/13854/robjohn "338,820 reputation") Mod Jun 10, 2013 at 16:23 | Show **66** more comments ## 39 Answers 39 Sorted by: [ Reset to default ](/questions/5020/mathjax-basic-tutorial-and- quick-reference?answertab=scoredesc#tab-top) Highest score (default) Date modified (newest first) Date created (oldest first) 1 [2](/questions/5020/mathjax-basic-tutorial-and-quick- reference?page=2&tab=scoredesc#tab-top "Go to page 2") [ Next](/questions/5020/mathjax-basic-tutorial-and-quick- reference?page=2&tab=scoredesc#tab-top "Go to page 2") This answer is useful 447 This answer is not useful Save this answer. [](/posts/5023/timeline) Show activity on this post. # Matrices 1. Use `$$\begin{matrix}…\end{matrix}$$` In between the `\begin` and `\end`, put the matrix elements. End each matrix row with `\\`, and separate matrix elements with `&`. For example, $$ \begin{matrix} 1 & x & x^2 \\ 1 & y & y^2 \\ 1 & z & z^2 \\ \end{matrix} $$ produces: 1xx21yy21zz2 MathJax will adjust the sizes of the rows and columns so that everything fits. 2. To add brackets, either use `\left…\right` as in section 6 of the tutorial, or replace `matrix` with `pmatrix` (1234), `bmatrix` [1234], `Bmatrix` {1234}, `vmatrix` |1234|, `Vmatrix` ‖1234‖. 3. Use `\cdots` ⋯ `\ddots` ⋱ `\vdots` ⋮ when you want to omit some of the entries: (1a1a21⋯an11a2a22⋯an2⋮⋮⋮⋱⋮1ama2m⋯anm) 4. For horizontally "augmented" matrices, put parentheses or brackets around a suitably-formatted table; see [arrays](http://meta.math.stackexchange.com/a/5044/) below for details. Here is an example: [123456] is produced by: $$ \left[ \begin{array}{cc|c} 1&2&3\\ 4&5&6 \end{array} \right] $$ The `cc|c` is the crucial part here; it says that there are three centered columns with a vertical bar between the second and third. 5. For vertically "augmented" matrices, use `\hline`. For example (abcd1001) is produced by $$ \begin{pmatrix} a & b\\ c & d\\ \hline 1 & 0\\ 0 & 1 \end{pmatrix} $$ 6. For small inline matrices use `\bigl(\begin{smallmatrix} ... \end{smallmatrix}\bigr)`, e.g. (abcd) is produced by: $\bigl( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \bigr)$ [Share](/a/5023 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Nov 22, 2021 at 12:27](/posts/5023/revisions "show all edits to this post") [![Calvin Khor's user avatar](https://i.stack.imgur.com/9gx6N.png?s=64&g=1)](/users/80734/calvin- khor) [Calvin Khor](/users/80734/calvin-khor) 33.8k11 gold badge2323 silver badges4545 bronze badges answered Aug 28, 2012 at 4:17 [![MJD's user avatar](https://www.gravatar.com/avatar/7de4b65c625c2ab158af7a3ada1b82f1?s=64&d=identicon&r=PG)](/users/25554/mjd) [MJD](/users/25554/mjd)MJD 64.1k99 gold badges4646 silver badges6868 bronze badges 11 * 27 This says "End each matrix row with \\\". But there is no reason to end the LAST row of the matrix that way. The double backslash means: now go on to the next row. But there isn't any next row after the last one. – [Michael Hardy](/users/11667/michael-hardy "1 reputation") Aug 28, 2014 at 5:15 * 5 I can't edit, but that could be phrased "Separate matrix rows with \\\". – [trichoplax is on Codidact now](/users/130983/trichoplax-is-on-codidact-now "159 reputation") Nov 18, 2016 at 9:43 * `as in section 6 of the tutorial`... Which tutorial? Is there a link to this tutorial section? – [Tom Hale](/users/389109/tom-hale "562 reputation") May 21, 2017 at 3:35 * @tom The tutorial is at the top of this page. It has numbered sections. – [MJD](/users/25554/mjd "64,093 reputation") May 21, 2017 at 17:04 * 8 @MichaelHardy but a \\\ on every line is harmless, and it makes the editing of matrices easier because swapping with the last line can be done with one quick keystroke in many editors. – [Reb.Cabin](/users/14168/reb-cabin "1,655 reputation") Feb 8, 2018 at 15:18 * Is it possible to get smallpmatrix or something? – [linear_combinatori_probabi](/users/390226/linear-combinatori-probabi "1,533 reputation") Aug 13, 2018 at 5:49 * There's something strange about the second matrix (right after "produces:"); it seems to render properly as a matrix on this page, but on the revision permalink [math.meta.stackexchange.com/revisions/5023/7](https://math.meta.stackexchange.com/revisions/5023/7) it shows up as raw LaTeX in a code block. – [j.c.](/users/826/j-c "594 reputation") Feb 16, 2021 at 21:31 * `vmatrix` does not show the vertical bar. – [alhelal](/users/332172/alhelal "137 reputation") Aug 4, 2022 at 5:51 * `vmatrix` does not show the vertical bar. (|032x+727x9+5x002x+5| =0) হলে x এর মান- – [alhelal](/users/332172/alhelal "137 reputation") Aug 4, 2022 at 6:38 * I am using ` ` – [alhelal](/users/332172/alhelal "137 reputation") Aug 4, 2022 at 7:06 * Is there a way to combine the horizontal and vertical lines in a single matrix to show the partitions of a matrix? – [Hosein Rahnama](/users/267844/hosein-rahnama "14,408 reputation") Mar 31 at 19:31 Add a comment | This answer is useful 323 This answer is not useful Save this answer. [](/posts/11284/timeline) Show activity on this post. ## Symbols In general, you have to search in long tables about a specific symbol you're looking for, things like Ψ, δ, ζ, ≥, ⊆ ... And it turns out that this operation can be frustrating and time consuming, which can cause the buddy to abandon writing the complete LATEX sentence in his answer, or in some cases, the complete answer itself. That's why the tool that I will present you in this post was conceived. Basically, it is a LATEX _handwritten symbol recognition_. Example in image: ![enter image description here](https://i.stack.imgur.com/ScK3R.png) Here is the website: [Detexify²](http://detexify.kirelabs.org/classify.html) No more frustration. [Share](/a/11284 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications answered [Oct 14, 2013 at 20:15](/posts/11284/revisions "show all edits to this post") community wiki [ user93957 ](/posts/11284/revisions "show revision history for this post") 4 * 5 How to implement `usepackage` ? I'd like to have `\iddots` from package `mathdots` available. – [Gottfried Helms](/users/1714/gottfried-helms "34,502 reputation") Jun 15, 2016 at 11:05 * 1 @GottfriedHelms see [this question](https://stackoverflow.com/q/21192606/1967396) \- I think the answer is "you can't do that"... – [Floris](/users/101979/floris "662 reputation") Jun 27, 2017 at 22:40 * @Floris: thanks, that is indeed the informative answer! – [Gottfried Helms](/users/1714/gottfried-helms "34,502 reputation") Jun 28, 2017 at 0:35 * 1 It recognized my horrible drawing with a finger on my notebook's mousepad! Unfortunately the symbol it recognized (mapsfrom) isn't part of MathJax – [Manfred Weis](/users/355149/manfred-weis "201 reputation") Oct 24, 2019 at 5:55 Add a comment | This answer is useful 308 This answer is not useful Save this answer. [](/posts/5024/timeline) Show activity on this post. # Aligned equations Often people want a series of equations where the equals signs are aligned. To get this, use `\begin{align}…\end{align}`. Each line should end with `\\`, and should contain an ampersand at the point to align at, typically immediately before the equals sign. For example, √37=√732−1122=√732122⋅732−1732=√732122√732−1732=7312√1−1732≈7312(1−12⋅732) is produced by \begin{align} \sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\ & = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\ & = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\ & = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\ & \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right) \end{align} The usual `$$` marks that delimit the display may be omitted here. [Share](/a/5024 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited Apr 22, 2015 at 7:36](/posts/5024/revisions "show all edits to this post") answered Aug 28, 2012 at 4:28 [![MJD's user avatar](https://www.gravatar.com/avatar/7de4b65c625c2ab158af7a3ada1b82f1?s=64&d=identicon&r=PG)](/users/25554/mjd) [MJD](/users/25554/mjd)MJD 64.1k99 gold badges4646 silver badges6868 bronze badges 20 * 7 The AMS's [Short Math Guide](ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math- guide.pdf) recommends the `align` environment over `eqnarray` in LaTeX. In MathJax the spacing seems to be the same , but `align` requires one less ampersand per line. – user856 Aug 28, 2012 at 4:41 * 3 Thanks. I was not sure whether to discuss that. [A detailed argument against `eqnarray` is in this article](http://tug.org/pracjourn/2006-4/madsen/madsen.pdf). – [MJD](/users/25554/mjd "64,093 reputation") Aug 28, 2012 at 4:51 * Would you mind if I changed your example to use `align` then? – user856 Aug 28, 2012 at 5:34 * @Rahul: Please go ahead and change anything that seems good to change. This is all CW. – [MJD](/users/25554/mjd "64,093 reputation") Aug 28, 2012 at 5:44 * Also, if you think you have a better example, please use it; I used the first one I found. – [MJD](/users/25554/mjd "64,093 reputation") Aug 28, 2012 at 5:49 * 7 Correct me if I'm wrong, but I don't believe the $$ is necessary before and after the \begin{align}. I've certainly never used it. From experience, the \begin{align} puts you into math-display mode by itself. – [TravisJ](/users/212738/travisj "7,314 reputation") Apr 21, 2015 at 12:24 * 7 I sometimes find that one line of this environment is too close to another, making them uncomfortable to read. The interline spacing can be adjusted by using input such as `\\[1ex]` instead of `\\ `. (And of course the `1` can be changed to another value such as `1.5` or `.7` in order to get enough space but not too much.) – [David K](/users/139123/david-k "93,648 reputation") Jan 30, 2016 at 16:29 * Note - in Jekyll I had to add an additional `\\` to break lines. – [baxx](/users/184261/baxx "758 reputation") May 24, 2016 at 17:45 * 4 @MJD i put the equation: \begin{align} f(x)&=\left(x^3\right)+\left(x^3+x^2+x^1\right)+\left(x^3+x^2\right)\\\ f'(x)&=\left(\left(3x^2+2x+1\right)+\left(3x^2+2x\right)\\\ f''(x)&=\left(6x+2\right)\\\ \end{align} but the third & is a problem: according to Mathjax, it does not go there. then when i remove it, it says that "a missing close brace or unclosed brace" is present. what am i doing wrong? – [Alexander Day](/users/432831/alexander-day "855 reputation") Apr 26, 2017 at 21:25 * 6 @AlexanderDay How did you used that boxed quote? What are commands or formats for it? – [Always Confused](/users/379641/always-confused "183 reputation") May 21, 2017 at 15:53 * @AlexanderDay I notice that right after your second `&=`, you have two instances of `\left(` in a row, and one of them is not closed. Removing one of them, I get: f(x)=(x3)+(x3+x2+x1)+(x3+x‌​2)f′(x)=(3x2+2x+1)+(3x2+2x)f″(x)=(6x+2) Is that what you expected? – [Dan Henderson](/users/197843/dan-henderson "121 reputation") Oct 2, 2017 at 13:31 * 4 @AlwaysConfused the box delimits a MathJax formula with a syntax error. – [Dan Henderson](/users/197843/dan-henderson "121 reputation") Oct 2, 2017 at 13:32 * There is a [difference between `aligned` and `align` environment](https://tex.stackexchange.com/questions/95402/what-is-the-difference-between-aligned-in-displayed-mode-and-starred-align). Equation above are just one equation with different representations, rather than multiple aligned equations. I think the correct environment is `aligned`. – [jdhao](/users/392858/jdhao "205 reputation") Jan 26, 2018 at 1:40 * 2 The `align*` variation does two things differently: left-aligns the equations and omits equation numbers; the regular `align` environment centers the equations and puts an equation number on each line, at least in my version of Jupyter notebooks. – [Reb.Cabin](/users/14168/reb-cabin "1,655 reputation") Feb 6, 2018 at 19:24 * 1 pandoc (or the underlying tex2pdf) actually complains if the \begin{align} is preceded by $$ – [TKH](/users/916361/tkh "101 reputation") Apr 18, 2021 at 7:01 | Show **5** more comments This answer is useful 257 This answer is not useful Save this answer. [](/posts/5025/timeline) Show activity on this post. ## Definitions by cases (piecewise functions) Use `\begin{cases}…\end{cases}`. End each case with a `\\`, and use `&` before parts that should be aligned. For example, you get this: f(n)={n/2,if n is even3n+1,if n is odd by writing this: f(n) = \begin{cases} n/2, & \text{if $n$ is even} \\ 3n+1, & \text{if $n$ is odd} \end{cases} The brace can be moved to the right: if n is even:n/2if n is odd:3n+1}=f(n) by writing this: \left. \begin{array}{l} \text{if $n$ is even:}&n/2\\ \text{if $n$ is odd:}&3n+1 \end{array} \right\} =f(n) To get a larger vertical space between cases we can use `\\[2ex]` instead of `\\`. For example, you get this: f(n)={n2,if n is even3n+1,if n is odd by writing this: f(n) = \begin{cases} \frac{n}{2}, & \text{if $n$ is even} \\[2ex] 3n+1, & \text{if $n$ is odd} \end{cases} (An ‘ex’ is a length equal to the height of the letter `x`; `2ex` here means the space should be two exes high.) [Share](/a/5025 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited Jan 25, 2016 at 22:09](/posts/5025/revisions "show all edits to this post") [![MichaelChirico's user avatar](https://i.stack.imgur.com/HRCYl.png?s=64&g=1)](/users/205203/michaelchirico) [MichaelChirico](/users/205203/michaelchirico) 4,12088 silver badges55 bronze badges answered Aug 28, 2012 at 4:34 [![MJD's user avatar](https://www.gravatar.com/avatar/7de4b65c625c2ab158af7a3ada1b82f1?s=64&d=identicon&r=PG)](/users/25554/mjd) [MJD](/users/25554/mjd)MJD 64.1k99 gold badges4646 silver badges6868 bronze badges 5 * @MJD Do we have to use the additional instruction `\displaystyle` when the formulas displayed are more complex ? – [jibe](/users/123292/jibe "892 reputation") Jul 1, 2014 at 14:43 * 4 @jibs `\displaystyle` is enabled automatically in displays, for example between `$$…$$`. You should not ever have to use it. – [MJD](/users/25554/mjd "64,093 reputation") Jul 1, 2014 at 14:50 * @jibe In general, the separate cases in this notation should be in text style unless they are very very complex (and then, the `{` notation is just wrong anyways). – [yo'](/users/43247/yo "4,398 reputation") Aug 25, 2014 at 9:53 * can this be written with ascii math instead of latex @MJD – [wrufesh](/users/262295/wrufesh "123 reputation") May 24, 2018 at 7:35 * What an absurd function to use as an example. Nobody would ever consider such a function. – [it's a hire car baby](/users/334732/its-a-hire-car-baby "9,115 reputation") Oct 30, 2018 at 21:56 Add a comment | This answer is useful 172 This answer is not useful Save this answer. [](/posts/5044/timeline) Show activity on this post. ## Arrays It is often easier to read tables formatted in MathJax rather than plain text or a fixed width font. Arrays and tables are created with the `array` environment. Just after `\begin{array}` the format of each column should be listed, use `c` for a center aligned column, `r` for right aligned, `l` for left aligned and a `|` for a vertical line. Just as with matrices, cells are separated with `&` and rows are broken using `\\`. A horizontal line spanning the array can be placed before the current line with `\hline`. For example, nLeftCenterRight10.2411252−1189−83−2020001+10i $$ \begin{array}{c|lcr} n & \text{Left} & \text{Center} & \text{Right} \\ \hline 1 & 0.24 & 1 & 125 \\ 2 & -1 & 189 & -8 \\ 3 & -20 & 2000 & 1+10i \end{array} $$ Arrays can be nested to make an array of tables. For example, min012300000101112012230123max012300123111232222333333Δ012300123110122210133210 As the source for the preceding array is long, please right-click on one of the tables and choose Show Math As ▸ TeX Commands. [Share](/a/5044 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited Aug 28, 2014 at 5:17](/posts/5044/revisions "show all edits to this post") community wiki [ 8 revs, 6 users 47% ](/posts/5044/revisions "show revision history for this post")[robjohn](/users/13854) 13 * 16 You'll have to wrap the contents of each cell in `\text` if you don't want allitalics,weird−lookingspacing,an′oddapostrophes. – user856 Aug 29, 2012 at 21:30 * @RahulNarain: True. I used words just for illustration, but I guess the example was slightly misleading. If you'd like to modify it please go ahead. – [axblount](/users/34700/axblount "2,266 reputation") Aug 29, 2012 at 22:00 * 2 Thanks! I like your numeric example better, since the widths of the entries are different enough that the alignment differences are visually clear. – [MJD](/users/25554/mjd "64,093 reputation") Aug 30, 2012 at 1:37 * @robjohn how do you use | while typing , i don't find it in my keyboard...... – [ABC](/users/67567/abc "6,006 reputation") Mar 28, 2013 at 12:05 * @exploringnet: on my keyboard, it is the shifted backslash. It may be in different places (or absent) depending on your keyboard. On my mobile device (iPhone), it is in the shifted numerics, to the right of the backslash. In mathmode, `\vert` gives | and `\mid` gives ∣, but neither works in the column spec for an array. If you cannot type it on your keyboard, you can alwaays copy and paste it from another document. – [robjohn](/users/13854/robjohn "338,820 reputation") Mod Mar 28, 2013 at 17:39 * It should perhaps be mentioned, that in nested arrays there seems to be no option to synchronize column-widths and/or row-heights over the top-level. I didn't find a solution such that if two arrays are stacked vertically one could make their column-widths matching/fit. – [Gottfried Helms](/users/1714/gottfried-helms "34,502 reputation") Aug 26, 2013 at 9:16 * 5 [This](http://www.tablesgenerator.com/) could also be convenient for some people, althought it destroys the joy of writing tables in LATEX by hand! – [nullgeppetto](/users/100951/nullgeppetto "2,956 reputation") Jun 3, 2014 at 14:18 * @Rahul: why did regulars not press developers to enhance HTML formatting instead of doing inconvenient and resource-devouring detours through MathJax? When a table contains (mostly) formulæ, the use of a formula-formatting engine looks determined. But when one wants _just a table,_ why should it run software with completely different purpose? I once tried to speak about it at meta.SE, but was gagged. – [Incnis Mrsi](/users/168952/incnis-mrsi "1,420 reputation") Dec 3, 2014 at 12:11 * @IncnisMrsi What kind of pressure could we apply: bribery, threats, kidnapping? A [feature request](http://meta.stackexchange.com/q/73566/259867) was made, supported by SE communities, and declined by SE (on technical grounds, as they say). At least we have the MathJax workaround, with all of its flaws: SO and others have nothing. – user147263 Dec 3, 2014 at 15:55 * 8 **Center Aligned Table Captions with Left Aligned Contents** BadBettereiπ2eiπ2eiπ/2∫π2−π2sinxdx∫π/2−π/2sinxdx – [GNUSupporter 8964民主女神 地下教會](/users/290189/gnusupporter-8964%e6%b0%91%e4%b8%bb%e5%a5%b3%e7%a5%9e-%e5%9c%b0%e4%b8%8b%e6%95%99%e6%9c%83 "17,458 reputation") Dec 12, 2016 at 16:41 * P.S. Table copied from MJD's example below so as to make an example with cells much wider than the caption. – [GNUSupporter 8964民主女神 地下教會](/users/290189/gnusupporter-8964%e6%b0%91%e4%b8%bb%e5%a5%b3%e7%a5%9e-%e5%9c%b0%e4%b8%8b%e6%95%99%e6%9c%83 "17,458 reputation") Dec 12, 2016 at 16:47 * @MJD Is there any command for a vertical line, like \hline ? The `{cc|c}` part in the array code is confusing. – [Tyma Gaidash](/users/905886/tyma-gaidash "9,286 reputation") May 14, 2022 at 16:50 * There is the \rm command instead of the entire code in \text – [Tyma Gaidash](/users/905886/tyma-gaidash "9,286 reputation") Apr 23 at 12:06 Add a comment | This answer is useful 163 This answer is not useful Save this answer. [](/posts/5057/timeline) Show activity on this post. ## Fussy spacing issues These are issues that won't affect the correctness of formulas, but might make them look significantly better or worse. Beginners should feel free to ignore this advice; someone else will correct it for them, or more likely nobody will care. Don't use `\frac` in exponents or limits of integrals; it looks bad and can be confusing, which is why it is rarely done in professional mathematical typesetting. Write the fraction horizontally, with a slash: BadBettereiπ2eiπ2eiπ/2∫π2−π2sinxdx∫π/2−π/2sinxdx The `|` symbol has the wrong spacing when it is used as a divider, for example in set comprehensions. Use `\mid` instead: BadBetter{x|x2∈Z}{x∣x2∈Z} When using stretchable delimiters (i.e. with `\left` and `\right`), it may be preferable to use `\,\middle|\,`. This produces a stretchable vertical bar with a little bit of space around it. Another alternative is to use a colon instead. BadBetter{mn∣m,n∈Z}{mn|m,n∈Z} For double and triple integrals, don't use `\int\int` or `\int\int\int`. Instead use the special forms `\iint` and `\iiint`: BadBetter∫∫Sf(x)dydx∬Sf(x)dydx∫∫∫Vf(x)dzdydx∭Vf(x)dzdydx Use `\,` to insert a thin space before differentials; without this TEX will mash them together: BadBetter∭Vf(x)dzdydx∭Vf(x)dzdydx [Share](/a/5057 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Jul 8, 2020 at 1:25](/posts/5057/revisions "show all edits to this post") community wiki [ 11 revs, 4 users 79% ](/posts/5057/revisions "show revision history for this post")[MJD](/users/25554) 11 * 3 I think the first adjusted fraction looks better than the original, but I don't like the second. In any case, this minor spacing imbalance is too peripheral to belong in a basic MathJax tutorial IMO. Too likely to scare people away rather than make them feel helped. – [hmakholm left over Monica](/users/14366/hmakholm-left-over-monica "282,566 reputation") Aug 31, 2012 at 21:05 * 2 @Henning Do you mean that the fraction example is too unimportant even to appear in an addendum on fussy spacing, or that the fussy spacing article is too unimportant to appear as an addendum to the tutorial? – [MJD](/users/25554/mjd "64,093 reputation") Aug 31, 2012 at 23:57 * 2 I was talking specifically about the fraction example. Mostly I'm concerned that somebody will come away thinking, _Eeek! Do I have to worry about THAT to use the site?_ But it's also arguable that the disclaimer at the top of the answer ought to take care of that. – [hmakholm left over Monica](/users/14366/hmakholm-left-over-monica "282,566 reputation") Sep 1, 2012 at 21:13 * 2 @MJD I like the less space, but what if we want to list the bounds for multiple integrals? Like if we have say 3 integrals and we have 3 separate bounds for each how would we list each one? Or do we have to do \int_bound1^bound2\int_bound3^bound4\int_bound5^bound6?? – [TheHopefulActuary](/users/43372/thehopefulactuary "4,684 reputation") Nov 19, 2012 at 19:45 * 2 @Kyle I think that's exactly what you do in that case. – [MJD](/users/25554/mjd "64,093 reputation") Nov 19, 2012 at 20:09 * 32 Worth nothing you can use `\middle` with | to get it to work with `\left` and `\right`, like `\left\{x\middle | \frac{x^2}{2} \in \mathbb{z}\right\}`: {x|x22∈z} – [asmeurer](/users/781/asmeurer "9,476 reputation") Jun 9, 2013 at 22:49 * 1 Thanks very much! I wanted to do that, but didn't know how. – [MJD](/users/25554/mjd "64,093 reputation") Jun 10, 2013 at 15:47 * @asmeurer Don't forget the spacing around the bar. – [user76284](/users/76284/user76284 "5,747 reputation") Apr 26, 2018 at 19:30 * 2 It seems `\middle \mid` doesn't work. What is the correct way to get the right spacing with automatic vertical resizing? – [asmeurer](/users/781/asmeurer "9,476 reputation") Apr 26, 2018 at 20:05 * In the case of base e powers I would recommend using exp(iπ/2) which is, in my opinion, even better than what's suggested in this post. – [mechanicious](/users/375407/mechanicious "403 reputation") Jun 9, 2018 at 23:08 * @asmeurer I always use `\left\{\, ... \,\middle|\, ... \,\right\}` like in {x∈R|x22∈Z}. – [Christoph](/users/86801/christoph "24,514 reputation") Dec 17, 2018 at 21:14 Add a comment | This answer is useful 145 This answer is not useful Save this answer. [](/posts/13183/timeline) Show activity on this post. # Crossing things out Use `\require{cancel}` in the first formula in your post that requires cancelling; you need it only once per page. Then use: y+\cancel{x}y+x\cancel{y+x}y+xy+\bcancel{x}y+xy+\xcancel{x}y+xy+\cancelto{0}{x}y+x0\frac{1\cancel9}{\cancel95} = \frac151995=15 Use `\require{enclose}` for the following: \enclose{horizontalstrike}{x+y}x+y\enclose{verticalstrike}{\frac xy}xy\enclose{updiagonalstrike}{x+y}x+y\enclose{downdiagonalstrike}{x+y}x+y\enclose{horizontalstrike,updiagonalstrike}{x+y}x+y `\enclose` can also produce enclosing boxes, circles, and other notations; see [MathML `menclose` documentation](https://developer.mozilla.org/en- US/docs/Web/MathML/Element/menclose) for a complete list. It is worth noting that MathJax should _not_ be used for formatting non- mathematical text. The preferred way for striking out text is to use the HTML strikethrough tag, `[text to be striken]`, which renders as ~~[text to be striken]~~. [Share](/a/13183 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Sep 19, 2022 at 18:06](/posts/13183/revisions "show all edits to this post") community wiki [ 5 revs, 2 users 97% ](/posts/13183/revisions "show revision history for this post")[MJD](/users/25554) 7 * 25 Can I use `\enclose{counterstrike}`? :P – [Akiva Weinberger](/users/166353/akiva-weinberger "21,460 reputation") Jul 27, 2015 at 19:19 * 61 That sneaky 19/95=1/5. Nice one! – [Darth Geek](/users/163930/darth-geek "12,048 reputation") Dec 8, 2015 at 23:57 * 28 I see you can further resolve existing resolutions, 04xx2+4x2+x – [alan2here](/users/6982/alan2here "997 reputation") May 1, 2016 at 2:40 * 2 Is `enclose` a LATEX package, or only a MathML option? – [Tim Thayer](/users/242719/tim-thayer "1,313 reputation") Nov 4, 2016 at 18:51 * 3 Here is a related post on meta: [Striking out equations](https://math.meta.stackexchange.com/q/4473). – [Martin Sleziak](/users/8297/martin-sleziak "52,209 reputation") Mar 20, 2019 at 3:15 * Nice command to make an arrow: `\cancelto{}{}` – user803596 Jul 21, 2020 at 11:32 * In fact, strikethrough markup should be avoided even in text as far as possible, in the interest of accessibility: they are not picked up by screen readers (see [veroniiiica.com/2020/05/29/…](https://veroniiiica.com/2020/05/29/tips-for-censoring-text-with-accessibility-in-mind/)). CC @XanderHenderson – [The Amplitwist](/users/915354/the-amplitwist "732 reputation") Sep 19, 2022 at 22:13 Add a comment | This answer is useful 126 This answer is not useful Save this answer. [](/posts/13081/timeline) Show activity on this post. ## Additional decorations `\overline`: ¯A ¯AA ¯AAA `\underline`: B_ BB_ BBB_ `\widetilde`: ˜C ~CC ~CCC `\widehat`: ˆD ^DD ^DDD `\fbox`: E EE EEE `\underleftarrow`: F← FF← FFF← variant: `\xleftarrow{}`: abc← `\underrightarrow`: G→ GG→ GGG→ variant: `\xrightarrow{}`: abc→ `\underleftrightarrow`: H↔ HH↔ HHH↔ `\overrightarrow` →AB →ABAB →ABABAB `\overbrace`: ⏞(n−2)+(n−1)+(n+0)+(n+1)+(n+2) `\underbrace`: (n−2)+(n−1)+(n+0)+(n+1)+(n+2)⏟ `\underbrace`: underbraces can be nested, like this: (n−2)+(n−1)+(n+0)⏟+(n+1)⏟+(n+2)⏟ `\overbrace` and `\underbrace` accept a superscript or a subscript, respectively, to annotate the brace. For example, `\underbrace{a\cdot a\cdots a}_{b\text{ times}}` is a⋅a⋯a⏟b times Note: `\varliminf`: lim_ and `\varlimsup`:¯lim have special symbol of their own. ## Single character accents `\check`: ˇI `\acute`: ˊJ `\grave`: ˊK `\vec`: →u →AB (c.f. `\overrightarrow` above) `\bar`: ˉz `\hat`: ˆx `\tilde`: ˜x `\dot \ddot \dddot`: ˙x,¨x,⃛x `\mathring`: ˚A ## General stacking If you cannot find your symbol remember that you can stack various symbols using `\overset{above}{level}`: @ABC x2⟼ ∙∘∘∙T `\underset{below}{level}`: ABC@ ⟼x2 T∙∘∘∙ You can use these together too. You can type Xa→bY with `X\overset{a}{\underset{b}{\to}}Y`. ## Arc over points `\overset{ \huge\frown}{PQ}`: ⌢PQ denotes the arc over points P and Q (As per comment of @Calvin Khor to @Paul Sinclair's question) [Share](/a/13081 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Mar 11 at 15:38](/posts/13081/revisions "show all edits to this post") community wiki [ 12 revs, 8 users 55% ](/posts/13081/revisions "show revision history for this post")[Américo Tavares](/users/752) 7 * Instead of using `$\fbox$`, you could also use `$\boxed{...}$` – [Mr Pie](/users/477343/mr-pie "9,341 reputation") Oct 19, 2017 at 21:23 * 2 added arrows with text variants, some new single char accents and general stacking section. – [zwim](/users/399263/zwim "27,337 reputation") Oct 27, 2017 at 1:42 * 5 `stackrel` also seems to work well, as in `\stackrel{\text{def}}{=}` ⟶def= – [Reb.Cabin](/users/14168/reb-cabin "1,655 reputation") Feb 6, 2018 at 16:48 * Is there a way to do arcs over points, such as to indicate the arc of a curve between two points P and Q? `\widearc {PQ}` doesn't seem to work. – [Paul Sinclair](/users/258282/paul-sinclair "41,660 reputation") Jul 29, 2019 at 21:41 * ⌢PQ kind of. – user645636 Sep 13, 2019 at 21:36 * 1 The best I've been able to come up with is `\overset{\frown}{PQ}` : ⌢PQ. But since `\frown` doesn't adjust in size, it doesn't look right. Does anyone know how get a properly sized arc? – [Paul Sinclair](/users/258282/paul-sinclair "41,660 reputation") Sep 20, 2019 at 23:47 * 2 @PaulSinclair I offer the following `\overset{\frown}{AB}\overset{ \large\frown}{CD}\overset{\Large\frown}{EF}\overset{ \huge\frown}{GH}\overset{\Huge\frown}{ABC}` ⌢AB⌢CD⌢EF⌢GH⌢ABC – [Calvin Khor](/users/80734/calvin-khor "33,754 reputation") Sep 22, 2019 at 7:11 Add a comment | This answer is useful 122 This answer is not useful Save this answer. [](/posts/6267/timeline) Show activity on this post. ## System of equations * Use `\begin{array}…\end{array}` and `\left\{…\right.`. For example, you get this: {a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3 by writing this: $$ \left\{ \begin{array}{c} a_1x+b_1y+c_1z=d_1 \\ a_2x+b_2y+c_2z=d_2 \\ a_3x+b_3y+c_3z=d_3 \end{array} \right. $$ * Alternatively we can use `\begin{cases}…\end{cases}`. The same system {a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3 is produced by the following code $$\begin{cases} a_1x+b_1y+c_1z=d_1 \\ a_2x+b_2y+c_2z=d_2 \\ a_3x+b_3y+c_3z=d_3 \end{cases} $$ * To align the `=` signs use `\begin{aligned}...\end{aligned}` and `\left\{…\right.` (see asmeurer's comment) {a1x+b1y+c1z=d1+e1a2x+b2y=d2a3x+b3y+c3z=d3 whose code is $$ \left\{ \begin{aligned} a_1x+b_1y+c_1z &=d_1+e_1 \\ a_2x+b_2y&=d_2 \\ a_3x+b_3y+c_3z &=d_3 \end{aligned} \right. $$ * To align the `=` signs and the terms as in {a1x+b1y+c1z=d1+e1a2x+b2y=d2a3x+b3y+c3z=d3 use `array` with `l` (for "align **left** "; there are also `c` and `r`) parameters $$ \left\{ \begin{array}{ll} a_1x+b_1y+c_1z &=d_1+e_1 \\ a_2x+b_2y &=d_2 \\ a_3x+b_3y+c_3z &=d_3 \end{array} \right. $$ * Vertical space between equations. As explained in [Definition by cases](https://math.meta.stackexchange.com/a/5025/752) _to get a larger vertical space between_ equations _we can use_ `\\[2ex]` _instead of_ `\\`. The system {a1x+b1y+c1z=p1q1a2x+b2y+c2z=p2q2a3x+b3y+c3z=p3q3 is generated by the following code `$$\begin{cases} a_1x+b_1y+c_1z=d_1 \\[2ex] a_2x+b_2y+c_2z=d_2 \\[2ex] a_3x+b_3y+c_3z=d_3 \end{cases} $$` in comparison with {a1x+b1y+c1z=p1q1a2x+b2y+c2z=p2q2a3x+b3y+c3z=p3q3 whose code is `$$\begin{cases} a_1x+b_1y+c_1z=\frac{p_1}{q_1} \\ a_2x+b_2y+c_2z=\frac{p_2}{q_2} \\ a_3x+b_3y+c_3z=\frac{p_3}{q_3} \end{cases} $$` * In response to [elect's comment](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference/6267#comment79746_6267). The following code `$$ \left\{ \begin{array}{l} 0 = c_x-a_{x0}-d_{x0}\dfrac{(c_x-a_{x0})\cdot d_{x0}}{\|d_{x0}\|^2} + c_x-a_{x1}-d_{x1}\dfrac{(c_x-a_{x1})\cdot d_{x1}}{\|d_{x1}\|^2} \\[2ex] 0 = c_y-a_{y0}-d_{y0}\dfrac{(c_y-a_{y0})\cdot d_{y0}}{\|d_{y0}\|^2} + c_y-a_{y1}-d_{y1}\dfrac{(c_y-a_{y1})\cdot d_{y1}}{\|d_{y1}\|^2} \end{array} \right. $$` produces {0=cx−ax0−dx0(cx−ax0)⋅dx0‖dx0‖2+cx−ax1−dx1(cx−ax1)⋅dx1‖dx1‖20=cy−ay0−dy0(cy−ay0)⋅dy0‖dy0‖2+cy−ay1−dy1(cy−ay1)⋅dy1‖dy1‖2 [Share](/a/6267 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited Mar 16, 2017 at 16:37](/posts/6267/revisions "show all edits to this post") community wiki [ 11 revs, 2 users 93% ](/posts/6267/revisions "show revision history for this post")[Américo Tavares](/users/752) 3 * 6 Is it possible to rotate text? To have a vertical word written in front of the large curly bracket that spans over all the equations? – [Steeven](/users/13230/steeven "701 reputation") Jul 3, 2017 at 14:21 * 4 @Steeven Go here ⟶ [math.meta.stackexchange.com/questions/27798/…](https://math.meta.stackexchange.com/questions/27798/is- it-possible-for-me-to-rotate-symbols-and-operations "is it possible for me to rotate symbols and operations") – [Mr Pie](/users/477343/mr-pie "9,341 reputation") Feb 1, 2018 at 4:32 * 1 Thank you, @user477343. This would be a useful feature on this list. – [Steeven](/users/13230/steeven "701 reputation") Feb 1, 2018 at 14:38 Add a comment | This answer is useful 122 This answer is not useful Save this answer. [](/posts/16888/timeline) Show activity on this post. ## Commutative diagrams (For more examples, see [this meta question](https://math.meta.stackexchange.com/q/2324/).) AMScd diagrams must start with a "require": $\require{AMScd}$ \begin{CD} A @>a>> B\\ @V b V V= @VV c V\\ C @>>d> D \end{CD} to get this diagram: Aa→Bb↓=↓cC→dD `@>>>` is used for arrow right `@<<<` is used for arrow left `@VVV` is used for arrow down `@AAA` is used for arrow up `@=` is used for horizontal double line `@|` is used for vertical double line `@.` is used for no arrow Another example: \begin{CD} A @>>> B @>{\text{very long label}}>> C \\ @. @AAA @| \\ D @= E @<<< F \end{CD} A→Bvery long label→C↑∥D=E←F Long labels increase the length of the arrow and in this version also automatically increase corresponding arrows. $\require{AMScd}$ \begin{CD} RCOHR'SO_3Na @>{\text{Hydrolysis,$\Delta, Dil.HCl$}}>> (RCOR')+NaCl+SO_2+ H_2O \end{CD} RCOHR'SO3NaHydrolysis, Δ, Dil. HCl→(RCOR')+NaCl+SO2\+ H2O [Share](/a/16888 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Jul 30, 2022 at 0:39](/posts/16888/revisions "show all edits to this post") community wiki [ 11 revs, 6 users 67% ](/posts/16888/revisions "show revision history for this post")[Lehs](/users/171248) 12 * \begin{CD} RCOHR'SO_3Na @>{\text{Hydrolysis,\Delta, Dil.HCl}>> (RCOR')+NaCl+SO_2+ H_2O \end{CD} Why does this code not give the correct output? – [Quark](/users/283281/quark "206 reputation") Feb 4, 2016 at 10:04 * @Quark: The main error was a missing bracket after HCl. – [Lehs](/users/171248/lehs "13,637 reputation") Feb 4, 2016 at 11:38 * @Lehs Thanks. That was a silly mistake :| What if I wanted to write something below the arrow? Also, could you suggest some online website to learn MathJax? – [Quark](/users/283281/quark "206 reputation") Feb 4, 2016 at 11:58 * @Quark: then you move a > sign: @>>{\text{very long label}}> I learn MathJax from the examples i.e. in this tread. – [Lehs](/users/171248/lehs "13,637 reputation") Feb 4, 2016 at 15:06 * @Lehs Why did you rollback my edit...? You removed the formatting from the list, broke again (in Chrome) the example diagram, and reinserted your duplicate example. Why? – [Najib Idrissi](/users/10014/najib-idrissi "53,122 reputation") Feb 4, 2016 at 15:25 * @NajibIdrissi: because your edit appeared as a mess in IE. The diagram wasn't even written out. Maybe there is something wrong in your or in my web-program. Now it looks good in IE. – [Lehs](/users/171248/lehs "13,637 reputation") Feb 4, 2016 at 15:44 * @NajibIdrissi: Now it also looks good in Chrome for Windows and for Android, plus Safari for Androids. I don't know what the problem is with the current version. – [Lehs](/users/171248/lehs "13,637 reputation") Feb 4, 2016 at 15:56 * 3 I realize this thread is quite old, but what about diagonal arrows? – [A. Thomas Yerger](/users/112357/a-thomas-yerger "17,428 reputation") Mar 23, 2017 at 5:01 * 2 @AlfredYerger: there are no such possibilities in AMScd. – [Lehs](/users/171248/lehs "13,637 reputation") Sep 28, 2017 at 3:57 * 3 @AlfredYerger Maybe presheaf can help there? See also answer and suggestions about this here: [How to draw a commutative diagram?](https://math.meta.stackexchange.com/q/2324) – [Martin Sleziak](/users/8297/martin-sleziak "52,209 reputation") Nov 6, 2017 at 11:44 * how to draw a double arrow pointing both directions to the left as well as to the right between two points in commutative diagram? – [Uncool](/users/223051/uncool "892 reputation") Mar 17, 2021 at 13:43 * How does one draw a curved arrow like in quiver? – [Tyma Gaidash](/users/905886/tyma-gaidash "9,286 reputation") Aug 27, 2022 at 14:42 Add a comment | This answer is useful 119 This answer is not useful Save this answer. [](/posts/10116/timeline) Show activity on this post. ## Colors Named colors are browser-dependent; if a browser doesn't know a particular color name, it may render the text as black. The following colors are standard in HTML4 and CSS2 and should be interpreted the same by most browsers: \color{black}{text}text\color{gray}{text}text\color{silver}{text}text\color{white}{text}text\color{maroon}{text}text\color{red}{text}text\color{yellow}{text}text\color{lime}{text}text\color{olive}{text}text\color{green}{text}text\color{teal}{text}text\color{aqua}{text}text\color{blue}{text}text\color{navy}{text}text\color{purple}{text}text\color{fuchsia}{text}text HTML5 and [CSS 3](http://en.wikipedia.org/wiki/Cascading_Style_Sheets#CSS_3) define [an additional 124 color names that will be supported on many browsers](http://www.w3.org/TR/css3-color/#svg-color). Math Stack Exchange's default style uses a light-colored page background, so avoid using light colors for text. Stick to darker colors like maroon, green, blue, and purple, and remember also that 7–10% of men are color-blind and have difficulty distinguishing red and green. (Some people have difficulty distinguishing other colors too, so don't rely on colors saying "the blue part" over and over again.) The color may also have the form `#rgb` where r,g,b are in the range or `0`–`9`, `a`–`f` and represent the intensity of red, green, and blue on a scale of 0–15, with `a`=10, `b`=11, … `f`=15. For example: #000text#00Ftext#0F0text#0FFtext#F00text#F0Ftext#FF0text#FFFtext #000text#005text#00Atext#00Ftext#500text#505text#50Atext#50Ftext#A00text#A05text#A0Atext#A0Ftext#F00text#F05text#F0Atext#F0Ftext#080text#085text#08Atext#08Ftext#580text#585text#58Atext#58Ftext#A80text#A85text#A8Atext#A8Ftext#F80text#F85text#F8Atext#F8Ftext#0F0text#0F5text#0FAtext#0FFtext#5F0text#5F5text#5FAtext#5FFtext#AF0text#AF5text#AFAtext#AFFtext#FF0text#FF5text#FFAtext#FFFtext You can have a look [here for quick reference on colors in HTML](http://www.w3schools.com/html/html_colors.asp). [Share](/a/10116 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Jan 31 at 12:57](/posts/10116/revisions "show all edits to this post") community wiki [ 7 revs, 4 users 69% ](/posts/10116/revisions "show revision history for this post")[MJD](/users/25554) 2 * 12 We should add that colors can be used on items other than text, such as variables and operators. The '\color' command applies to the next item: surround anything longer with braces. – [Rory Daulton](/users/161807/rory-daulton "31,988 reputation") Feb 21, 2015 at 20:30 * 1 One can in fact use any CSS-compatible colour specification here, including `rgb`, `rgba`, `hsl`, and `hsla` colours. (I'd edit the answer, but have no time now. Maybe later, if nobody else beats me to it.) – [Harald Hanche-Olsen](/users/23290/harald-hanche-olsen "31,432 reputation") Oct 11, 2018 at 14:31 Add a comment | This answer is useful 101 This answer is not useful Save this answer. [](/posts/5058/timeline) Show activity on this post. ## Continued fractions To make a continued fraction, use `\cfrac`, which works just like `\frac` but typesets the results differently: x=a0+12a1+22a2+32a3+44a4+⋯ Don't use regular `\frac` or `\over`, or it will look awful: x=a0+12a1+22a2+32a3+44a4+⋯ You can of course use `\frac` for the compact notation: x=a0+12a1+22a2+32a3+44a4+⋯ Continued fractions are too big to put inline. Display them with `$$`…`$$` or use a notation like [a0;a1,a2,a3,…]. [Share](/a/5058 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications answered [Aug 31, 2012 at 19:46](/posts/5058/revisions "show all edits to this post") community wiki [ MJD ](/posts/5058/revisions "show revision history for this post") 8 * 3 The RHS of the following continued fraction a1b1+a2b2+a3b3+⋱=a1b1+a2b2+a3b3+… can be typeset with the \genfrac command '{\genfrac{}{}{}{}{a_1}{b_1}} {\genfrac{}{}{0pt}{}{}{+}} {\genfrac{}{}{}{}{a_2}{b_2}} {\genfrac{}{}{0pt}{}{}{+}} {\genfrac{}{}{}{}{a_3}{b_3}} {\genfrac{}{}{0pt}{}{}{+\dots}}' – [Américo Tavares](/users/752/am%c3%a9rico-tavares "38,242 reputation") Sep 17, 2012 at 20:39 * I wonder if something like 121+34 would be good enough? It is much simpler. (`\frac12{\vphantom{1}\atop+}\frac34`) – [MJD](/users/25554/mjd "64,093 reputation") Sep 17, 2012 at 22:30 * 1 Yes, it is. I didn't mention it because in _User’s Guide for the amsmath Package_ it is written the following: "Note. For technical reasons, using the primitive fraction commands \over, \atop, \above in a LATEX document is not recommended (see, e.g., amsmath.faq)." – [Américo Tavares](/users/752/am%c3%a9rico-tavares "38,242 reputation") Sep 17, 2012 at 22:44 * 4 Happily, we are not writing LATEX documents here. – [MJD](/users/25554/mjd "64,093 reputation") Sep 17, 2012 at 22:44 * 11 Or write `\underset{j=1}{\overset{\infty}{\LARGE\mathrm K}}\frac{a_j}{b_j}=\cfrac{a_1}{b_1+\cfrac{a_2}{b_2+\cfrac{a_3}{b_3+\ddots}}}` to get ∞Kj=1ajbj=a1b1+a2b2+a3b3+⋱. – [Américo Tavares](/users/752/am%c3%a9rico-tavares "38,242 reputation") Jan 24, 2013 at 9:15 * 10 @AméricoTavares Or use `\mathop` instead of `\overset` and `\underset`: `\mathop{\LARGE\mathrm K}_{i=1}^\infty \frac{a_i}{b_i}` ∞Ki=1aibi – [AlexR](/users/86940/alexr "24,645 reputation") Feb 21, 2015 at 20:48 * @AlexR It's easier, thanks! – [Américo Tavares](/users/752/am%c3%a9rico-tavares "38,242 reputation") May 17, 2015 at 13:24 * @AméricoTavares, Why don't you edit the answer and put this extremely helpful command into there, I think that would be more helpful. – user249332 Jan 24, 2016 at 15:44 Add a comment | This answer is useful 98 This answer is not useful Save this answer. [](/posts/11491/timeline) Show activity on this post. # Tags & References For longer calculations (or referring to other post's results) it is convenient to use the tagging/labelling/referencing system. To tag an equation use `\tag{yourtag}`, and if you want to refer to that tag later on, add `\label{somelabel}` right after the `\tag`. It is not necessary that `yourtag` and `somelabel` are the same, but it usually is more convenient to do so: $$ a := x^2-y^3 \tag{*}\label{*} $$ a:=x2−y3 In order to refer to an equation, just use `\eqref{somelabel}` $$ a+y^3 \stackrel{\eqref{*}}= x^2 $$ a+y3(*)=x2 or `\ref{somelabel}` Equations are usually referred to as $\eqref{*}$, but you can also use $\ref{*}$. Equations are usually referred to as (*), but you can also use *. As you can see, references are even turned into hyperlinks, which you can use externally as well, e.g. [like this](https://math.stackexchange.com/q/537284/#mjx-eqn-e). Note that you can also reference labels in other posts as long as they appear on the same site, which is especially useful when referring to a question with multiple equations, or when commenting on a post. * * * ~~Due to a[bug blocks containing a `\label` will break in preview](http://meta.math.stackexchange.com/q/11392/163), as [a workaround you can put `$\def\label#1{}$` in your post while editing and remove that on submission](http://meta.math.stackexchange.com/questions/11392/mathjax- preview-broken-when-equations-contain-labels#comment43134_11392) \- unfortunately this means you won't spot misspelled references before submitting... **Just don't forget to remove that`\def` again**~~ [Share](/a/11491 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited Apr 13, 2017 at 12:22](/posts/11491/revisions "show all edits to this post") community wiki [ 3 revs ](/posts/11491/revisions "show revision history for this post")[Tobias Kienzler](/users/163) 10 * 12 Also works in comments: `\eqref{*}` yields a clickable (*) – [Tobias Kienzler](/users/163/tobias-kienzler "6,411 reputation") Oct 31, 2013 at 10:22 * To enable automatically tagging your queations with incremental numbers, add to your header. – [Gerald Senarclens de Grancy](/users/306682/gerald-senarclens-de-grancy "101 reputation") Jan 20, 2016 at 20:56 * @GeraldSenarclensdeGrancy That would however yield a global numbering on all answers to one question, not per-answer. And it would break the current expectation of by default not having tags despite using unstarred `\begin{align}` etc.... Though personally I'd agree with this – [Tobias Kienzler](/users/163/tobias-kienzler "6,411 reputation") Jan 21, 2016 at 7:19 * 6 I'm just curious, is there a way to have the tags on the _left side_ of the equation? Something like(1)∑jk But the (1) tag is all the way to the left. – [Crescendo](/users/390385/crescendo "4,039 reputation") Aug 26, 2017 at 16:46 * How do we write a tag without brackets (because I want to tag a little square as a box of accomplishment)? – [Mr Pie](/users/477343/mr-pie "9,341 reputation") Dec 12, 2017 at 1:20 * @user477343 No idea, you could ask at [tex.stackexchange.com](https://tex.stackexchange.com/) or see if the manual of amsmath has something... – [Tobias Kienzler](/users/163/tobias-kienzler "6,411 reputation") Dec 12, 2017 at 9:30 * @Crescendo You could ask on [tex.stackexchange.com](https://tex.stackexchange.com/) for a solution. A workaround could be `\begin{array}{lc}` or similar. – [Tobias Kienzler](/users/163/tobias-kienzler "6,411 reputation") Dec 12, 2017 at 9:31 * 3 Hey, I figured how to tag without brackets. You simply put what is inside the braces: _{\tag*{…}}_ which I learnt from here ⟶ [math.meta.stackexchange.com/questions/27731/…](https://math.meta.stackexchange.com/questions/27731/how- do-you-tag-without-brackets-in-particular-how-do-you-tag-boxes "how do you tag without brackets in particular how do you tag boxes") – [Mr Pie](/users/477343/mr-pie "9,341 reputation") Jan 28, 2018 at 0:42 * How do I add several tags analogously to empheq? e.g. {2x1+3x2=8(1a)7x1+9x2=−13(1b) – [Dmitrii Demenev](/users/852050/dmitrii-demenev "153 reputation") Jul 19, 2022 at 13:22 * I can't make `\tag{*}\label{*}` work—when I use it, the equation is never rendered into an image and in the code that is displayed in place of the image this show up as "\tag{}\label{}". `\tag{1}\label{1}` on the other hand does work. – [HelloGoodbye](/users/119068/hellogoodbye "521 reputation") Mar 2 at 16:53 Add a comment | This answer is useful 94 This answer is not useful Save this answer. [](/posts/11638/timeline) Show activity on this post. # Using `\newcommand` I would like to remark that it is possible to define LaTeX commands as you do in your TeX files. I felt so happy when I first discovered it! It's enough to insert something like $ \newcommand{\SES}[3]{ 0 \to #1 \to #2 \to #3 \to 0 } $ at the top of your post (remember the dollars!). Then you can just use your commands as you are used to do: in my example typing `$$ \SES{A}{B}{C} $$` will produce the following: 0→A→B→C→0 It's also possible to use plain `\def`: \def\ses#1#2#3{0 \to #1 \to #2 \to #3 \to 0} and then `$\ses{A}{B}{C}$` will produce the same output. [Share](/a/11638 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited Feb 12, 2015 at 12:43](/posts/11638/revisions "show all edits to this post") community wiki [ 3 revs, 3 users 67% ](/posts/11638/revisions "show revision history for this post")[Abramo](/users/3416) 5 * 12 Be aware that this affects the entire post, possibly even the frontpage, so it should be used [with great care](http://meta.math.stackexchange.com/questions/4130/the-scope-of- newcommand-is-the-entire-page). – [AlexR](/users/86940/alexr "24,645 reputation") Feb 21, 2015 at 20:55 * 2 \SES123 – [ericw31415](/users/333981/ericw31415 "556 reputation") May 7, 2018 at 22:03 * 5 @AlexR It's been fixed since. – [iBug](/users/428188/ibug "399 reputation") Apr 10, 2019 at 3:40 * This unfortunately doesn't work in stackedit.io which I sometimes use to compose and edit longer stackexchange posts. Anyone aware of possible workarounds or alternatives? – [joseville](/users/833760/joseville "1,437 reputation") Jan 7, 2022 at 18:19 * Why does this not work with \def? – [Tyma Gaidash](/users/905886/tyma-gaidash "9,286 reputation") Apr 23 at 12:19 Add a comment | This answer is useful 87 This answer is not useful Save this answer. [](/posts/9954/timeline) Show activity on this post. `\implies` (⟹) is a [marginally preferable](https://tex.stackexchange.com/questions/47063/rightarrow-vs- implies-and-does-not-imply-symbol) alternative to `\Rightarrow` (⇒) for implication. There's also `\iff` ⟺ and `\impliedby` ⟸. `\to` (→) is preferable to `\rightarrow` or `\longrightarrow` for things like f:A→B. The reverse is `\gets` (←). [Share](/a/9954 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited Apr 13, 2017 at 12:34](/posts/9954/revisions "show all edits to this post") community wiki [ 4 revs, 3 users 71% ](/posts/9954/revisions "show revision history for this post")[leonbloy](/users/312) 8 * 6 Why is it preferable? – [MJD](/users/25554/mjd "64,093 reputation") Jul 9, 2013 at 20:00 * 18 implies looks nicer as the arrow is longer and \to is quicker to right (and it's also what you say in your head while typing it). at least that's what I think. – [John Salvatierrez](/users/47620/john-salvatierrez "477 reputation") Jul 29, 2013 at 13:21 * 3 Remember the difference between `\to` and `\mapsto` as in T:R→R,x↦x+1 produced by `T:\mathbb R\to \mathbb R,\; x\mapsto x+1` – [yo'](/users/43247/yo "4,398 reputation") Aug 25, 2014 at 9:57 * 8 I prefer using `\to` when it appears as part of a larger propositional formula, rather than at the top level, i.e. p∧((q∨r)→s), because the spacing is similar to that of other binary operators. `\implies` is better for sentence- or clause-level implications, or in displays, i.e. x+2=4−x⟹x=1. – [Mario Carneiro](/users/50776/mario-carneiro "26,906 reputation") Feb 2, 2015 at 14:22 * I have always used _\Longleftarrow_ for _\impliedby_. It generates the same thing anyway, for which the former generates ⟸ and the latter generates ⟸ with _\Leftarrow_ ⇐ as an alternate for reverse implication. – [Mr Pie](/users/477343/mr-pie "9,341 reputation") Jan 16, 2018 at 6:47 * @yo' instead of _\mathbb_ you could also use _\Bbb_ as a matter of fact :) – [Mr Pie](/users/477343/mr-pie "9,341 reputation") Jan 16, 2018 at 6:53 * Is there a way to add some text above impllies? Such as "by (1)" to refer to another equation that is used for substitution and similar cases. – [Alexandros](/users/402948/alexandros "214 reputation") Dec 27, 2019 at 22:02 * 1 @Alexandros yes `\overset{3.1415}{\underset{26535}{\implies}}` produces 3.1415⟹26535 – user645636 Feb 8, 2020 at 12:12 Add a comment | This answer is useful 79 This answer is not useful Save this answer. [](/posts/11423/timeline) Show activity on this post. # Big braces Use `\left` and `\right` to make braces - (round), [square] and {curly} - scale up to be the size of their arguments. Thus $$ f\left( \left[ \frac{ 1+\left\{x,y\right\} }{ \left( \frac{x}{y}+\frac{y}{x} \right) \left(u+1\right) }+a \right]^{3/2} \right) $$ renders as f([1+{x,y}(xy+yx)(u+1)+a]3/2). Note that curly braces need to be escaped as `\{ \}`. If you start a big brace with `\left` and then need to match that to a `\right` brace that's on a different line, use the forms `\right.` and `\left.` to make "shadow" braces. Thus, $$ \begin{aligned} a=&\left(1+2+3+ \cdots \right. \\ & \cdots+ \left. \infty-2+\infty-1+\infty\right) \end{aligned} $$ renders as a=(1+2+3+⋯⋯+∞−2+∞−1+∞). There is also a `\middle` construct which is useful when one has a mid- expression brace which must also scale up: $$ \left\langle q \middle\| \frac{\frac{x}{y}}{\frac{u}{v}} \middle| p \right\rangle $$ renders as ⟨q‖xyuv|p⟩. Note that constructs like `\left\langle`, `\left|` and `\left\|` are also possible. [Share](/a/11423 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications answered [Oct 25, 2013 at 17:47](/posts/11423/revisions "show all edits to this post") community wiki [ E.P. ](/posts/11423/revisions "show revision history for this post") 1 * 5 Note: `\Big( ... \Big)` produces (…) but this bracket size is fixed in all situations unlike `\left( ... \right)` which varies in size with its contents. `\Big` can be useful in various situations. – [Nick](/users/60900/nick "6,606 reputation") Dec 19, 2014 at 6:34 Add a comment | This answer is useful 77 This answer is not useful Save this answer. [](/posts/12850/timeline) Show activity on this post. ## Limits To make a limit (like limx→1x2−1x−1), use this syntax: First, start off with `$\lim`. This renders as lim. The backslash is there to prevent things like lim, where the letters are slanted. Second, add `\limits_{x \to 1}` inside. The code now looks like `$\lim \limits_{x \to 1}$`, and renders as limx→1. The `\to` inside makes the right arrow, rendered as →. The `_` makes the x→1 go underneath the lim. Finally, the pair of curly braces `{ }` makes sure that x→1 is treated as a whole object, and not two separate things. Lastly, add the function you want to apply the limit to. To make the limit mentioned above, limx→1x2−1x−1, simply use `$\lim\limits_{x \to 1} \frac{x^2-1}{x-1}$`. And that is how you make a limit using MathJax. [Share](/a/12850 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited Jul 17, 2014 at 12:25](/posts/12850/revisions "show all edits to this post") community wiki [ 2 revs, 2 users 94% ](/posts/12850/revisions "show revision history for this post")[JChau](/users/128641) 7 * 28 Why not just `\lim_{x\to 1}` limx→1? As I understand it `\limits` is only needed for operations that don't already understand limits, for example if you want to use `+` and get k+i=1 instead of +ki=1 When used inline, your suggestion will produce limx→1 instead of the more compact form limx→1 that mathjax normally chooses. Are you sure this is good advice? – [MJD](/users/25554/mjd "64,093 reputation") Feb 26, 2014 at 14:10 * 4 @MJD `$\lim_{x\to 1}` renders to limx→1, and `$\lim\limits_{x\to 1` renders as lim\limits_{x\to 1}. Note how the x→1 is separated from the first limit, and not directly underneath. We do not write limits like that in real life, so we use `\limits`. – [Anonymous Computer](/users/128641/anonymous-computer "5,249 reputation") Feb 26, 2014 at 16:19 * 2 I meant that the second limit renders to limx→1 – [Anonymous Computer](/users/128641/anonymous-computer "5,249 reputation") Feb 26, 2014 at 16:28 * 9 Limits are usually written that way in typeset materials like papers and books when the limit is inline, rather than a displayed formula, and that's why MathJax typesets it that way. – [MJD](/users/25554/mjd "64,093 reputation") Feb 26, 2014 at 16:41 * 13 The issue with this answer is that it is trying to "force" display mode on inline code. Doing so makes the text look less pretty. For example, see how the spacing between the lines change when I force display mode using `\lim\limits_{x\mapsto 1}\dfrac1x`: limx↦11x. On the other hand, when I let TEX do what it wants to do, using `\lim_{x\mapsto 1}\frac1x`, the spacing between the lines stays the same, which is much neater: limx↦11x. This is much easier on the eyes. If you want to make your math mode more prominent then take a new line using `$$-$$` – [user1729](/users/10513/user1729 "30,054 reputation") Jul 17, 2014 at 12:30 * 9 The moral is: TEX was written by a [jolly clever chap](http://en.wikipedia.org/wiki/Donald_Knuth). Let it do what it wants, because it does it for a reason! – [user1729](/users/10513/user1729 "30,054 reputation") Jul 17, 2014 at 12:35 * 2 Part 11 of the "question" shows how to write limits in the way they were meant to be written in LaTeX and MathJax. – [David K](/users/139123/david-k "93,648 reputation") Nov 14, 2015 at 23:17 Add a comment | This answer is useful 65 This answer is not useful Save this answer. [](/posts/15077/timeline) Show activity on this post. # Arbitrary operators If an operator is not available as a built-in command, use `\operatorname{…}`. So for things like arsinh(x) write `\operatorname{arsinh}(x)` since `\arsinh(x)` will give an error and `arsinh(x)` has wrong font and spacing: arsinh(x). This was already mentioned in [a comment](http://meta.math.stackexchange.com/questions/5020/mathjax-basic- tutorial-and-quick-reference/11638#comment19884_5020) by [Charles Staats](http://meta.math.stackexchange.com/users/455/charles-staats). You might consider this an addition to the FAQ section on `\lim`, `\sin` and so on. For operators which need limits above and below the operator, use `\operatorname*{…}`, as in Resz=1(1z2−z)=1 New operators may also be defined using the `\DeclareMathOperator` syntax: `\DeclareMathOperator{newOperatorCommand}{newOperator}` defines a new operator. On the page where this code occurs, `\newOperatorCommand` will be rendered as newOperator. [Share](/a/15077 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Sep 15, 2022 at 5:32](/posts/15077/revisions "show all edits to this post") community wiki [ 4 revs, 3 users 56% ](/posts/15077/revisions "show revision history for this post")[MvG](/users/35416) 8 * 1 We can also use {\rm ...}. For example, {\rm arsinh} yields arsinh. – [Felix Marin](/users/85343/felix-marin "87,621 reputation") Aug 12, 2014 at 0:27 * 19 @Felix: `\rm` will change the font but not the spacing. `\operatorname{arsinh}x` renders as “arsinhx” while `{\rm arsinh}x` renders as “arsinhx”. Notice the added space between operator and operand in the first example, which is missing in the second. On the whole, I'd say that `operatorname` is a lot more in the spirit of semantic markup, declaring _what_ you want to write instead of _how_ you want to write it, so I'd strongly suggest using this. – [MvG](/users/35416/mvg "40,969 reputation") Aug 13, 2014 at 11:27 * 5 Thanks. I didn't know there was a difference between them. I always avoided operatorname because it was too long. – [Felix Marin](/users/85343/felix-marin "87,621 reputation") Aug 13, 2014 at 14:41 * 3 Thanks for this. I thought carefully about whether to put `\operatorname` in the main post, and decided to leave it out. The reason is simple: If a beginner omits `\operatorname`, the resulting formula will still be perfectly clear, and a more experienced user will have no trouble inserting the `\operatorname` where it is needed. So including it in the main post would not be a good use of space. – [MJD](/users/25554/mjd "64,093 reputation") Aug 16, 2014 at 6:28 * 3 ... I always use "\text{operator }". Hmmm, arsinh x vs arsinhx. – [JP McCarthy](/users/19352/jp-mccarthy "8,188 reputation") Feb 10, 2015 at 16:48 * 4 If you use the same operator many times, I think you can do `\DeclareMathOperator{\arsinh}{arsinh}` at the post's top. Never tried it though… – [MickG](/users/135592/mickg "8,345 reputation") Aug 15, 2015 at 17:28 * What is the code for the last one? – [Laxmi Narayan Bhandari](/users/931957/laxmi-narayan-bhandari "2,027 reputation") May 27, 2021 at 8:07 * @Laxmi you can right-click on MathJax formulas and select "Show Math As / TeX Commands" to see the code for any formula. You can also click on the date of the edits to see edit history, and in that history use "Side-by-side Markdown" rendering to see the source of the whole post. – [MvG](/users/35416/mvg "40,969 reputation") May 27, 2021 at 15:07 Add a comment | This answer is useful 63 This answer is not useful Save this answer. [](/posts/22395/timeline) Show activity on this post. # Highlighting equation To highlight an equation, `\bbox` can be used. E.g, $$ \bbox[yellow] { e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n \qquad (1) } $$ produces ex=limn→∞(1+xn)n(1) By default, the bounding box is "tight", so it doesn't extend beyond the characters used in the formula. You can add a little space around the equation by adding a measurement after the color. E.g., $$ \bbox[yellow,5px] { e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n \qquad (1) } $$ produces ex=limn→∞(1+xn)n(1) To add a border, use $$ \bbox[5px,border:2px solid red] { e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n \qquad (2) } $$ produces ex=limn→∞(1+xn)n(2) You can do both border and background, as well: $$ \bbox[yellow,5px,border:2px solid red] { e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n \qquad (1) } $$ produces ex=limn→∞(1+xn)n(1) [Share](/a/22395 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited Jul 4, 2016 at 11:05](/posts/22395/revisions "show all edits to this post") community wiki [ 4 revs, 3 users 53% ](/posts/22395/revisions "show revision history for this post")[webbertiger](/users/126845) 2 * 2 When using constructs like this, please heed the points raised in [this discussion](http://meta.math.stackexchange.com/q/23150/43351) on usage of colour. – [Lord_Farin](/users/43351/lord-farin "17,523 reputation") May 20, 2016 at 15:56 * 1 This would be a very helpful feature. – [Always Confused](/users/379641/always-confused "183 reputation") May 19, 2017 at 13:36 Add a comment | This answer is useful 59 This answer is not useful Save this answer. [](/posts/15078/timeline) Show activity on this post. # Absolute values and norms The absolute value of some expression can be denoted as `\lvert x\rvert` or, more generally, as `\left\lvert … \right\rvert`. It renders as |x|. The norm of a vector (or similar) can be denoted as `\lVert v\rVert` or, more generally, as `\left\lVert … \right\rVert`. It renders as ‖v‖. (You may also write `\left\|…\right\|` instead.) In both cases, the rendering is better than what you'd get from `|x|` or `||v||`, which render with bars that don't descend low enough and sub-optimal spacing. At least on some browsers, so here is a screenshot how it looks for me, using Firefox 31 on OS X: ![Screenshot](https://i.stack.imgur.com/6midR.png) And here is the same formula rendered by your browser: |x|,||v||⟶|x|,‖v‖ It was typeset as $$|x|, ||v|| \quad\longrightarrow\quad \lvert x\rvert, \lVert v\rVert$$ [Share](/a/15078 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited Aug 13, 2014 at 11:59](/posts/15078/revisions "show all edits to this post") community wiki [ 4 revs, 3 users 89% ](/posts/15078/revisions "show revision history for this post")[MvG](/users/35416) 6 * 8 You can use `\|x\|` instead of `\lVert x \rVert`; ‖x‖ and ‖x‖. (I don't think that there is a difference between them. I've tried [asking on SE](tex.stackexchange.com/questions/77767/whats-the-correct-way-to-write- norm).) – [Martin Sleziak](/users/8297/martin-sleziak "52,209 reputation") Jun 24, 2014 at 8:48 * On my browser `|x|` and `\lvert x\rvert` (|x| and |x|) look identical, contrary to your claim. Perhaps you need to show an example more complicated than just 'x'? – [MJD](/users/25554/mjd "64,093 reputation") Jun 24, 2014 at 12:39 * @MJD: What's your browser? I included a screenshot to support my claim. – [MvG](/users/35416/mvg "40,969 reputation") Aug 13, 2014 at 11:24 * Usually various versions of Firefox on either Linux or Windows. I happen to have Windows 8 booted now, so here's a screenshot from there: [a.pomf.se/jrujkq.PNG](http://a.pomf.se/jrujkq.PNG) The bar height looks good on both pairs of symbols; the spacing is a little off for the `||` version. On Linux they looked the same. – [MJD](/users/25554/mjd "64,093 reputation") Aug 13, 2014 at 17:02 * Here's a screenshot with FF 31.0 under Linux: [a.pomf.se/fhwmjo.png](http://a.pomf.se/fhwmjo.png) – [MJD](/users/25554/mjd "64,093 reputation") Aug 16, 2014 at 6:23 * 4 The difference in output that you are seeing has to do with whether you have the STIX fonts installed locally on your computer or not. The `|` in STIX doesn't descend below the baseline, while in the MathJax TeX fonts it does. – [Davide Cervone](/users/7798/davide-cervone "119 reputation") May 20, 2016 at 14:16 Add a comment | This answer is useful 57 This answer is not useful Save this answer. [](/posts/21258/timeline) Show activity on this post. ## Giving reasons on each line of a sequence of equations To produce this: v+w=0Given−w=−w+0additive identity−w+0=−w+(v+w)equations (1) and (2) write this: \begin{align} v + w & = 0 &&\text{Given} \tag 1\\ -w & = -w + 0 && \text{additive identity} \tag 2\\ -w + 0 & = -w + (v + w) && \text{equations $(1)$ and $(2)$} \end{align} [Share](/a/21258 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited Feb 15, 2016 at 18:33](/posts/21258/revisions "show all edits to this post") community wiki [ 2 revs ](/posts/21258/revisions "show revision history for this post")[David K](/users/139123) 4 * 1 Using multiple `\tag` commands in my equations causes them to break. It only takes one tag per equation and it labels the entire thing instead of allowing tagging on a _per-line_ basis. Any ideas? – [code_dredd](/users/407237/code-dredd "103 reputation") Jun 1, 2019 at 20:19 * @code_dredd The particular formatting in this answer still seems to work. Perhaps you could post your formulas in a new meta question to get help with them. – [David K](/users/139123/david-k "93,648 reputation") Jun 2, 2019 at 5:20 * Why would you use \tag, instead of just using ()? – [Some Guy](/users/730299/some-guy "2,682 reputation") Feb 1, 2021 at 21:13 * 1 @SomeGuy First, this is what `\tag` is meant for. It puts the (1) exactly where it should be, at the right margin. Second, if you have an equation like `0 = ax^2+bx+c` and you **just** use `(1)` on it instead of `\tag1`, you end up with 0=ax2+bx+c(1). To fix this, instead of `\tag` you have to insert other commands to make enough blank space. Not a net gain, in my opinion. – [David K](/users/139123/david-k "93,648 reputation") Feb 2, 2021 at 0:59 Add a comment | This answer is useful 48 This answer is not useful Save this answer. [](/posts/22516/timeline) Show activity on this post. # Pack of cards If you are asking (or answering) a combinatorics question involving packs of cards you can make it look more elegant by using `\spadesuit`, `\heartsuit`, `\diamondsuit`, `\clubsuit` in math mode: ♠♡♢♣ Or if you're really fussy: `\color{red}{\heartsuit}` and `\color{red}{\diamondsuit}` ♡♢ You can also enter the standard Unicode characters (`U+2660 BLACK SPADE SUIT` etc.) literally, or copy them from here: ♠♡♢♣♤♥♦♧ [Share](/a/22516 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited May 29, 2018 at 16:09](/posts/22516/revisions "show all edits to this post") community wiki [ 3 revs, 3 users 53% ](/posts/22516/revisions "show revision history for this post")[David](/users/119775) 9 * 1 This is very nice! Is there other auto-shapes or stickers? – [Always Confused](/users/379641/always-confused "183 reputation") May 19, 2017 at 13:37 * 1 Is it also possible to draw the spade and club in outlines and fill the heart and diamond with a colour? – [Always Confused](/users/379641/always-confused "183 reputation") May 19, 2017 at 13:39 * 2 @AlwaysConfused None that come to mind. Google search turned up [this](https://tex.stackexchange.com/questions/9641/filled-diamondsuit-and- heartsuit) which might help. Otherwise search for a TeX/LaTeX/MathJax symbol table. – [David](/users/119775/david "80,605 reputation") May 22, 2017 at 23:48 * 1 @AlwaysConfused Unicode has those characters, so you can enter them however you normally enter Unicode characters, or you can now use copy-paste to copy them from this answer. – [MJD](/users/25554/mjd "64,093 reputation") May 29, 2018 at 16:11 * 1 @MJD Not sure that your edit is a good idea, firstly because I think we would prefer questions and answers on MSE to be in MathJax as far as possible, secondly because this page is specifically a MathJax tutorial. However I'm not really bothered - if you still think it's a good idea, let me know and I'll approve the edit. – [David](/users/119775/david "80,605 reputation") May 30, 2018 at 4:31 * Is there a way to force the heart and diamond suit symbols to be filled, like the club and spade? – [code_dredd](/users/407237/code-dredd "103 reputation") Jun 2, 2019 at 18:39 * @code_dredd See my previous comment in reply to "Always Confused", also the comment by MJD. – [David](/users/119775/david "80,605 reputation") Jun 2, 2019 at 22:08 * @David I guess nothing has changed since then... Thanks. – [code_dredd](/users/407237/code-dredd "103 reputation") Jun 2, 2019 at 23:36 * To the above commenters - it is possible, for instance ♥♡ achieved via the code `$$\color{yellow}♥\!\!\!\color{blue}♡$$ ` but you will need to fiddle with the number of `\!`s depending on where you put it, because I don't think there is a command in mathJax to place characters on top of each other. Another example,`$$\Huge \color{green}\Huge \color{green}♥\!\!\!\!\!\!\!\!\!\!\,\color{red}♡$$` gives ♥♡ – [Calvin Khor](/users/80734/calvin-khor "33,754 reputation") Mar 28, 2020 at 6:02 Add a comment | This answer is useful 44 This answer is not useful Save this answer. [](/posts/13310/timeline) Show activity on this post. ## Left and Right Implication Arrows Another way to display the arrows for right and left implication instead of using `$\Rightarrow$`, `$\Leftarrow$` and `$\Leftrightarrow$` which produces ⇒, ⇐ and ⇔ respectively, you can use `$\implies$` for ⟹, `$\impliedby$` for ⟸ and `$\iff$` for ⟺ The latter of which produces longer arrows which may be more desirable to some. [Share](/a/13310 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited May 6, 2014 at 22:15](/posts/13310/revisions "show all edits to this post") community wiki [ 3 revs, 2 users 74% ](/posts/13310/revisions "show revision history for this post")[jnh](/users/125659) Add a comment | This answer is useful 38 This answer is not useful Save this answer. [](/posts/19678/timeline) Show activity on this post. # Degree symbol Standard Mathjax does not yet support a dedicated degree symbol, so here are some of the ways to try and emulate one : 45^\text{o}renders as45o45^orenders as45o45^\circrenders as45∘45^{\large\circ}renders as45∘45\unicode{xB0}renders as45°Actual Unicode character90°renders as90°Using keyboard entry of symbol The degree symbol for angles is _not_ `^\circ`. Although many people use this notation, the result looks quite different from the canonical [degree symbol](http://en.wikipedia.org/wiki/Degree_symbol) shipped with the font, as seen above. If your keyboard doesn't have a `°` key, feel free to copy from this post here, or follow [these suggestions](http://en.wikipedia.org/wiki/Degree_symbol#Keyboard_entry). _Note_ that comments below indicate that on some configurations at least, `°` renders inferior to `^\circ`. And I recently had [a post of mine edited](https://math.stackexchange.com/posts/612972/revisions#rev- arrow-2c001335-10cd-45c9-a20f-6458a8020593) just for the sake of turning `°` into `^\circ`, indicating that someone felt rather strongly about this. So the suggestion above does seem somewhat controversial at the moment. I maintain that from a semantic point of view, `°` is superior to `^\circ`, and if the rendering suffers from this, then it's a bug in MathJax. After all, LaTeX offers a proper degree symbol in the tex companion fonts, indicating that someone there, too, decided that `^\circ` is not perfect. But if things are broken now, I can't fault people from pragmatically sticking with the rendering they prefer. Personally I prefer semantics, also for the sake of screen readers. **Accessibility** Aside from appearance, one consideration in choosing which notation to use is how it will get parsed by screen readers. For example, [ChromeVox](http://www.chromevox.com/) reads both `45^\circ` and `45°` as "forty-five degrees", while the other two are pronounced as "forty-five oh", which may be a reason to avoid them. **Usepackage** Commonly in Latex you can `\usepackage{gensymb}` to get the `\degree` symbol, however on Stack Exchange this is not an option. Note that even if you can do this it will typically affect the entire page, which may have side effects for other users. So don't rely on this approach. [Share](/a/19678 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Feb 26, 2021 at 12:11](/posts/19678/revisions "show all edits to this post") community wiki [ 10 revs, 6 users 47% ](/posts/19678/revisions "show revision history for this post")[StephenG](/users/298172) 14 * 2 If mathjax loads siunitx or gensymb, there is then \degree in latex which is the degree symbol. – [dustin](/users/78317/dustin "8,153 reputation") Feb 17, 2015 at 22:29 * 1 @dustin: I couldn't find siunitx or gensymb mentioned anywhere in the MatJax source repository. Are they available as some kind of third-party extension? If so, where? Since MathJax is _not_ LaTeX, packages can't be loaded unless they have been migrated. By the way, all occurrences of “degree” in the MathJax sources refer to something else, as far as I can tell, so there really doesn't seem to be a `\degree` macro. There should be one, imho. – [MvG](/users/35416/mvg "40,969 reputation") Feb 17, 2015 at 23:39 * 2 I am not a mathjax expert. I just know latex. I just gave that suggestion in case they were available. [Siunitx](http://mirror.unl.edu/ctan/macros/latex/contrib/siunitx/siunitx.pdf) would be a great package to have. If you aren't familiar, you will see the advantage by scanning the documentation on ctan. – [dustin](/users/78317/dustin "8,153 reputation") Feb 17, 2015 at 23:43 * 16 On my display, ° looks bad and `^\circ` looks good: [a.pomf.se/xnlfyg.png](http://a.pomf.se/xnlfyg.png) – [MJD](/users/25554/mjd "64,093 reputation") Mar 24, 2015 at 21:10 * 3 Degree sign can generally be typed by holding down `Alt` and typing `0176` on the numeric keypad. `°` (I don't know how international the actual number is). The leading zero is required. – [Joffan](/users/206402/joffan "39,288 reputation") Apr 19, 2017 at 14:04 * 1 @Joffan: 167 is the decimal representation of the Codepoint for ° in Latin 1, Unicode and CP-1252. Without the leading zero, CP-437 gets applied instead, at least in typical English-speaking countries, so you'd use Alt+248 there. The Wikipedia article I linked to already describes those two ways of entering the symbol, and [en.wikipedia.org/wiki/Alt_code](https://en.wikipedia.org/wiki/Alt_code) has some more details. – [MvG](/users/35416/mvg "40,969 reputation") Apr 20, 2017 at 22:24 * How to use [Radian (c)](https://en.wikipedia.org/wiki/Radian) , [gradian (g)](https://en.wikipedia.org/wiki/Gradian) and [Steradian (sr)](https://en.wikipedia.org/wiki/Steradian) ? And also, Angstrom (though a lenght unit)? – [Always Confused](/users/379641/always-confused "183 reputation") May 21, 2017 at 16:06 * Actually we can write degrees by 90^o (O for Orange, using lowercase o, like 'o'), and it'd render it close to degrees symbol 90o+30o+45o – user427802 May 31, 2018 at 14:41 * 1 @AbhasKumarSinha It looks quite slanty to me. – [Tom Hale](/users/389109/tom-hale "562 reputation") Jun 13, 2018 at 3:57 * 3 @StephenG: I'm not happy with [your latest edit](https://math.meta.stackexchange.com/revisions/19678/6). I feel that it is not helpful to users if we suggest even more ways to poorly format that symbol (like `^o` imho), or to mention a LaTeX approach just to say it won't work. You deleted the example for `45°`, but kept the sentence talking about it, including the colon. I'm reluctant to revert your edit on a CW page without a conversation, but as it stands I see the edit as a change for the worse. Can we find a combined solution? – [MvG](/users/35416/mvg "40,969 reputation") Oct 8, 2018 at 19:09 * I just wrote a [feature request](https://math.meta.stackexchange.com/q/29238/35416) for a `\degree` symbol, since I believe it would be technically easy and conceptually beneficial to have such a symbol defined for the whole site. – [MvG](/users/35416/mvg "40,969 reputation") Oct 8, 2018 at 19:25 * @MvG I have added an entry to the "renders as" table for keyboard entry (which frankly looks awful IMO) but regarding your "unhappiness" note only one line was deleted from the version preceding my first edit and I regard your belief that this justifies your claim my edit was "unhelpful" is nonsense. I fail to see how undoing my edit helps anyone but you. – [StephenG - On Strike](/users/298172/stepheng-on-strike "727 reputation") Oct 10, 2018 at 4:16 * While we're at it, I included my comment on accessibility from the feature request post, since it may be more useful here. It would be nice if other people tested other screen readers to get a sample size of higher than one. – [Misha Lavrov](/users/383078/misha-lavrov "130,559 reputation") Oct 10, 2018 at 5:25 * I recently discovered `\mathring` and hence there is a further variant `a\mathring{}`a˚ which is neither `circ`a∘ nor the actual unicode symbol a° – [Calvin Khor](/users/80734/calvin-khor "33,754 reputation") Nov 22, 2021 at 2:34 Add a comment | This answer is useful 37 This answer is not useful Save this answer. [](/posts/21096/timeline) Show activity on this post. ## Long division $$ \require{enclose} \begin{array}{r} 13 \\[-3pt] 4 \enclose{longdiv}{52} \\[-3pt] \underline{4}\phantom{2} \\[-3pt] 12 \\[-3pt] \underline{12} \end{array} $$ 134524_21212_ One important trick shown here is the use of `\phantom{2}` to make a blank space that is the same size and shape as the digit `2` just above it. This is adapted from (which uses slightly different but not less valid formatting). [Share](/a/21096 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") Follow Follow this answer to receive notifications [edited May 23, 2017 at 12:39](/posts/21096/revisions "show all edits to this post") community wiki [ 6 revs, 3 users 92% ](/posts/21096/revisions "show revision history for this post")[David K](/users/139123) 2 * 10 [Synthetic division](https://en.wikipedia.org/wiki/Ruffini%27s_rule). Example to find that x3−6x2+11x−6=(x−1)(x2−5x+6)+0 x3x2x1x01−611−61↓1−561−56|−0 `\begin{array}{c|rrrr}& x^3 & x^2 & x^1 & x^0\\ & 1 & -6 & 11 & -6\\ {\color{red}1} & \downarrow & 1 & -5 & 6\\ \hline & 1 & -5 & 6 & |\phantom{-} {\color{blue}0} \end{array}` – [Américo Tavares](/users/752/am%c3%a9rico-tavares "38,242 reputation") Aug 21, 2016 at 14:32 * 1 @Maria Mazur For the same example x3−6x2+11x−6x−1=x2−5x+6: x3−6x2+11x−6x−1−x3+x2x2−5x+6−5x2+11x−6−5x2−5x+6x−6−6x+600 I've used this code `\begin{array}{rrrr|ll} x^3 & -6x^2 & +11x & -6 & x - 1 \\ -x^3 & +x^2 & & & x^2-5x+6 \\ \hline & -5x^2 & +11x & -6\\ & \phantom{-}5x^2 & -5x & & & & \\ \hline & & +6x & -6 \\ & & -6x & +6 \\ \hline & & 0 & 0 \end{array}` – [Américo Tavares](/users/752/am%c3%a9rico-tavares "38,242 reputation") May 16, 2019 at 20:06 Add a comment | This answer is useful 30 This answer is not useful Save this answer. [](/posts/25054/timeline) Show activity on this post. # Displaystyle and Textstyle Many things like fractions, sums, limits, and integrals display differently when written inline versus in a displayed formula. You can switch styles back and forth with `\displaystyle` and `\textstyle` in order to achieve the desired appearance. Here's an example switching back and forth in a displayed equation: > > $$\sum_{n=1}^\infty \frac{1}{n^2} \to > \textstyle \sum_{n=1}^\infty \frac{1}{n^2} \to > \displaystyle \sum_{n=1}^\infty \frac{1}{n^2}$$ > > > ∞∑n=11n2→∑∞n=11n2→∞∑n=11n2 It is possible to switch style inline as well: > > Compare $\displaystyle \lim_{t \to 0} \int_t^1 f(t)\, dt$ > versus $\lim_{t \to 0} \int_t^1 f(t)\, dt$. > > > Compare limt→0∫1tf(t)dt versus limt→0∫1tf(t)dt. Do observe that the taller formulas gotten with `\displaystyle` distort the line spacing. > Filler text, more filler text and even more filler text, and an outrageous > amount of filler text. It would not occur to me to use limt→0∫1tf(x)dx here. > As we see, a formula typeset in displaystyle makes it necessary to move the > lines further apart. A ridiculous amount of filler text to make a point. Not > pleasing to the eye at all. In other words, there is also a reason TeX defaults to `\textstyle` when typesetting inline formulas. [Share](/a/25054 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Sep 24, 2022 at 20:07](/posts/25054/revisions "show all edits to this post") community wiki [ 4 revs, 3 users 70% ](/posts/25054/revisions "show revision history for this post")[Alexis Olson](/users/11246) 3 * 4 Oh!! I was always confused on why some people had `\displaystyle`. – [Simply Beautiful Art](/users/272831/simply-beautiful-art "73,744 reputation") Nov 7, 2016 at 0:42 * 1 @SimplyBeautifulArt I was always wondering on why the math expressions of some people looked nicer than mine.. – user486983 Sep 21, 2018 at 21:37 * There is also AbC `$\scriptstyle{AbC}$` and AbC `$\scriptscriptstyle{AbC}$`. – [emacs drives me nuts](/users/746312/emacs-drives-me-nuts "9,003 reputation") Mar 5, 2020 at 8:52 Add a comment | This answer is useful 29 This answer is not useful Save this answer. [](/posts/25048/timeline) Show activity on this post. # Vertical Spacing Some formulas such as ¯a+¯b=¯a⋅b, √a−√b, do not look quite right when it comes to vertical spacing. Fortunately, there is more than one way to fix this. One can for instance employ the `\mathstrut` command as follows: $\sqrt{\mathstrut a} - \sqrt{\mathstrut b}$ Which yields: √(a−√(b. Or using `\vphantom` (vertical phantom) command, which measures the height of its argument and places a math strut of that height into the formula. $\sqrt{\vphantom{b} a} - \sqrt{b}$ Which renders as: √ba−√b. Another issue is with the spacing within lines in situations like this, > Based on the previous technique, we can simplify 1√ba−√b, and we thus get > the result of the previous limit. [this text is added to show alignment with > the above smashed object] These two lines are too far apart, but this is unnecessary since the second line is very short. We can solve this by using the `\smash` command, to get: > Based on the previous technique, we can simplify 1√ba−√b, and we thus get > the result of the previous limit. [this text is added to show alignment with > the above smashed object] **Beware** \- as above - the smashed text may overlap the next line if that line extends far enough to reach the smashed object, so this solution is not always feasible (it is esp. likely to occur in slim-width browsers, e.g. phones). Analogous overlapping may occur with any prior lines. Note that smash can be restricted to top or bottom with an argument: `\smash[t]...` or `\smash[b]...` [Share](/a/25048 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Sep 5, 2022 at 20:06](/posts/25048/revisions "show all edits to this post") community wiki [ 4 revs, 2 users 91% ](/posts/25048/revisions "show revision history for this post")[Workaholic](/users/201168) 5 * Alternatively, one can also sneak in a rule of zero width `\rule{0pt}{2ex}`, as [explained here](https://tex.stackexchange.com/a/455649/26348). – [on4aa](/users/79712/on4aa "105 reputation") Apr 29, 2020 at 15:06 * 4 On Android, at least, the results of `\smash` look awful. The formula overlaps the text. – [dfeuer](/users/17596/dfeuer "8,929 reputation") Mar 5, 2022 at 1:10 * @dfeuer Android is not the source of the problem. Rather it is the fact that the browser window width is so short that the 2nd line extends far enough to be below the radical, so smashing the radical causes it to overlap the 2nd line. The same thing occurs in any browser if you make its width small enough. – [Bill Dubuque](/users/242/bill-dubuque "266,075 reputation") Sep 5, 2022 at 18:20 * @BillDubuque, okay, but it's still a problem for mobile browsers. – [dfeuer](/users/17596/dfeuer "8,929 reputation") Sep 5, 2022 at 19:42 * @dfeuer Again, it's not "mobile" browsers that are the source of the problem - rather it is the fact that there is something displayed below the smashed object. That is more likely to occur on phones since they are more likely to have shorter width screens. If you shrink the width of a desktop browser window to be small enough (or extend the length of the following line) then the above answer will show the problem there too (e.g. I edited the answer to show that). – [Bill Dubuque](/users/242/bill-dubuque "266,075 reputation") Sep 5, 2022 at 19:58 Add a comment | This answer is useful 27 This answer is not useful Save this answer. [](/posts/27793/timeline) Show activity on this post. # Equation numbering ## Simple equation To give an equation a number, use the `\tag{}`. To refer to it later, use `\label{}` to label this equation. When you want to refer to it, use `\eqref{}`. For example, e=mc2 Equation (1) is one of the greatest equations in mankind's history. Equation (1) is produced using the following code, $$e=mc^2 \tag{1}\label{eq1}$$ To refer to it, use `\eqref{eq1}`. ## Multi-line equation Multi-line equation is actually just one equation rather than several equations. So the correct environment is `aligned` instead of `align`. a=b+c=d+e+f+g=h+i Equation (2) is a multi-line equation. The code to produce equation (2) is $$\begin{equation}\begin{aligned} a &= b + c \\ &= d + e + f + g \\ &= h + i \end{aligned}\end{equation}\tag{2}\label{eq2}$$ ## Multiple aligned equations For multiple aligned equations, we use the `align` environment. a=b+cx=yzl=m−n Equation (3), (4) and (5) are multiple equations aligned together. The code to produce these equations is, $$\begin{align} a &= b + c \tag{3}\label{eq3} \\ x &= yz \tag{4}\label{eq4}\\ l &= m - n \tag{5}\label{eq5} \end{align}$$ [Share](/a/27793 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Dec 24, 2022 at 16:06](/posts/27793/revisions "show all edits to this post") community wiki [ 4 revs, 4 users 92% ](/posts/27793/revisions "show revision history for this post")[jdhao](/users/392858) 10 * I don’t believe there is any difference between _align_ and _aligned_ , but whatever feels comfortable I suppose. – [Mr Pie](/users/477343/mr-pie "9,341 reputation") Feb 2, 2018 at 6:12 * There is actaully a difference, read [here](https://tex.stackexchange.com/questions/95402/what-is-the-difference-between-aligned-in-displayed-mode-and-starred-align) for a detailed discussions. – [jdhao](/users/392858/jdhao "205 reputation") Feb 2, 2018 at 6:28 * thank you very much for clearing up that understanding :) – [Mr Pie](/users/477343/mr-pie "9,341 reputation") Feb 2, 2018 at 6:30 * You are welcome. When in doubt, always google it first :). – [jdhao](/users/392858/jdhao "205 reputation") Feb 2, 2018 at 6:32 * If there's an equation with multiple lines, is there a way to add tags on a _per-line_ basis, i.e. `\tag{1}` for line 1, `\tag{2}` for line 2, etc? If I use the `\tag{...}` commands, I can only use one per equation and it labels the entire equation, not each line. – [code_dredd](/users/407237/code-dredd "103 reputation") Jun 1, 2019 at 20:17 * I am not aware of this kind of command. What is your use case? – [jdhao](/users/392858/jdhao "205 reputation") Jun 4, 2019 at 2:27 * the last equation numbering can also be used with `align*` instead of `align` – [Masacroso](/users/173262/masacroso "29,428 reputation") Dec 2, 2019 at 23:59 * I get all tags on the first line: "a = b + c (3)(4)(5)". – [Jiri Kriz](/users/12741/jiri-kriz "2,077 reputation") Dec 13, 2019 at 13:55 * Why do we need both `$$` and `\begin{equation}` with `aligned`? I noticed that when I omitted `\begin{equation}` that I did not get an equation number, but that does not happen when I use only `$$` without any other environments inside. – [Randy Cragun](/users/409527/randy-cragun "101 reputation") May 12, 2021 at 20:41 * If equations are not being numbered, is there any (practical) difference between `aligned` and `align`? (I understand they **should** be used with single equations and multiple equations respectively.) I've checked the link mentioned in an earlier comment which shows several examples of differences, but none of them seem to apply when using Mathjax here on Math Stack Exchange; they use environments like `tabular` or `list` or `enumerate`, none of which are recognized by Mathjax. Also, is there any reason to use `\begin{equation}` and `\end{equation}` if equations are not being numbered? – [A.J.](/users/654406/a-j "3,777 reputation") Apr 28 at 8:05 Add a comment | This answer is useful 20 This answer is not useful Save this answer. [](/posts/27756/timeline) Show activity on this post. # Linear programming ## Formulation A theoretical LPP can be typeset as \begin{array}{ll} \text{maximize} & c^T x \\ \text{subject to}& d^T x = \alpha \\ &0 \le x \le 1. \end{array} maximizecTxsubject todTx=α0≤x≤1. To input a numerical LPP, use `alignat` instead of `align` to get better alignment between signs, variables and coefficients. \begin{alignat}{5} \max \quad & z = & x_1 & + & 12 x_2 & & & && \\ \mbox{s.t.} \quad & & 13 x_1 & + & x_2 & + & 12x_3 & \geq 5 && \tag{constraint 1} \\ & & x_1 & & & + & x_3 & \leq 16 && \tag{constraint 2} \\ & & 15 x_1 & + & 201 x_2 & & & = 14 && \tag{constraint 3} \\ & & \rlap{x_i \ge 0, i = 1, 2, 3} \end{alignat} maxz=x1+12x2s.t.13x1+x2+12x3≥5x1+x3≤1615x1+201x2=14xi≥0,i=1,2,3 We treat max, z, each variable, ± sign and RHS as one separate column, while leaving an extra empty column on the right. Then we count the number of separators `&`, add one into this number then divide it by two. (e.g. (9 + 1) ÷ 2 = 5) `\rlap` is used so that the last row spans over one column. Optional: `\tag` is used to label the constraints. ## Change MATLAB/Octave matrices to LATEX code To get fractions, execute `format rat` at the beginning. Writing manually the LATEX code for a matrix with many rows and columns in Octave is tedious. The Octave function strcat("\\begin{bmatrix}\n",strrep(strrep(mat2str(A)," "," & "), ... ";"," \\\\\n")(2:end-1),"\n\\end{bmatrix}\n") converts A = [1 2 2; 2 3 4; 4 4 2] A = 1 2 2 2 3 4 4 4 2 to \begin{bmatrix} 1 & 2 & 2 \\ 2 & 3 & 4 \\ 4 & 4 & 2 \end{bmatrix} so that pasting the generated code gives [122234442]. ## Simplex tableaux Since the coefficient of the objective value variable z _never_ changes, my habit is to omit the z-column to save ink. ### Normal simplex tableau \begin{array}{rrrrrr|r} & x_1 & x_2 & s_1 & s_2 & s_3 & \\ \hline s_1 & 0 & 1 & 1 & 0 & 0 & 8 \\ s_2 & 1 & -1 & 0 & 1 & 0 & 4 \\ s_3 & 1 & 1 & 0 & 0 & 1 & 12 \\ \hline & -1 & -1 & 0 & 0 & 0 & 0 \end{array} x1x2s1s2s3s1011008s21−10104s31100112−1−10000 It can be stacked up to give an illustration of the entering of variables at different stages. \begin{array}{rrrrrrr|rr} & x_1 & x_2 & s_1 & s_2 & s_3 & w & & \text{ratio} \\ \hline s_1 & 0 & 1 & 1 & 0 & 0 & 0 & 8 & - \\ w & 1^* & -1 & 0 & -1 & 0 & 1 & 4 & 4 \\ s_3 & 1 & 1 & 0 & 0 & 1 & 0 & 12 & 12 \\ \hdashline & 1 & -1 & 0 & -1 & 0 & 0 & 4 & \\ \hline s_1 & 0 & 1 & 1 & 0 & 0 & 0 & 8 & \\ x_1 & 1 & -1 & 0 & -1 & 0 & 1 & 4 & \\ s_3 & 0 & 2 & 0 & 2 & 1 & -1 & 8 & \\ \hdashline & 0 & 0 & 0 & 0 & 0 & -1 & 0 & \end{array} x1x2s1s2s3wratios10110008−w1∗−10−10144s311001012121−10−1004s10110008x11−10−1014s302021−1800000−10 ### Dual simplex tableau \begin{array}{rrrrrrrr|r} & x_1 & x_2 & x_3 & x_4 & x_5 & x_6 & x_7 & \\ \hline x_4 & 0 & -3 & 7 & 1 & 0 & 0 & 2 & 2M -4 \\ x_5 & 0 & -9 & 0 & 0 & 1 & 0 & -1 & -M -3 \\ x_6 & 0 & 6 & -1 & 0 & 0 & 1 & -4^* & -4M +8 \\ x_1 & 1 & 0 & 1 & 0 & 0 & 0 & 1 & M \\ \hline & 0 & 1 & 1 & 0 & 0 & 0 & 2 & 2M \\ \text{ratio} & & & 1 & & & & 1/2 & \end{array} x1x2x3x4x5x6x7x40−3710022M−4x50−90010−1−M−3x606−1001−4∗−4M+8x11010001M01100022Mratio11/2 It can be stacked up to give a theoretical illustration of what happens in the upcoming steps. x1x2x3s1s2s3s1−20−2100−60s2−2−4∗−5010−70s30−3−1001−27810250000ratio−4−5/2−5s1−2∗0−2100−60x21/215/40−1/4035/2s33/2011/40−3/4151/23025/205/20−175ratio−3/225/4x1101−1/20030x2013/41/4−1/405/2s3005/43/4−3/4∗1−39/20019/23/25/20−265ratio…x1101−1/20030x2011/300−1/39s200−5/3−11−4/3260041/34010/3−330 ## Duality A picture is worth [a thousand words](https://math.stackexchange.com/q/2572928/290189). maxz=cTxs.t.Ax≤bx≥0duality⇄minv=bTys.t.ATy≥cy≥0(PC)(DC)add ⇃slack varminus ⇂surplus varmaxz=cTxs.t.Ax+s=bx,s≥0duality⇄some steps skippedminv=bTys.t.ATy−t=cy,t≥0(PS)(DS) [Share](/a/27756 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Feb 16, 2019 at 9:55](/posts/27756/revisions "show all edits to this post") community wiki [ 3 revs, 2 users 100% ](/posts/27756/revisions "show revision history for this post")[GNUSupporter 8964民主女神 地下教會](/users/290189) 1 * 6 It must have taken _more_ than a thousand words to write _that_ picture though :D – [Mr Pie](/users/477343/mr-pie "9,341 reputation") Jul 20, 2018 at 9:25 Add a comment | This answer is useful 20 This answer is not useful Save this answer. [](/posts/27212/timeline) Show activity on this post. ## Units While LATEX has packages that format units, MathJax does not. For visual consistency, one should format units within the same string of MathJax code as the value to which it corresponds, separating the value and unit with `\` (space-backslash-space) since the [BIPM](https://www.bipm.org/en/publications/si-brochure/) recommends a small space between the value and units. In addition, follow the below conventions for formatting values and units: ### Decimal Separator & Digit Separation Following the conventions of the English-speaking world, a period `.` should be used to separate the decimal part of a number from the integral part, not a comma `,` as is common in some languages. This is because commas are already reserved for separating mathematical notation such as arguments of multivariate functions, elements of a set, and the coordinates of ordered tuples. No punctuation should be used to separate multiples of three digits on either side of the decimal separator; instead, a small space rendered by `\,` should be used on both sides of the decimal marker when the string of digits consists of more than four or five digits. For example, * `4321.1234` 4321.1234 * `54\,321.123\,45` 54321.12345 * `0.56789` 0.56789 * `0.567\,89` 0.56789 If you use a decimal separator, you should include a digit on both sides of the separator, even if the digit is simply 0. ### Powers of 10 It is preferable to write scientific or engineering notation like this: `4.15\times10^{n}` 4.15×10n. The spacing around `\times` × is taken care of on its own, so there is no need to insert the spacing manually. Nevertheless, if necessary, use an upright variant of the letter ‘E’ or ‘e’ to indicate order of magnitude, such as * `\mathrm{E}\,6` E6 * `\scriptsize{\mathrm{E}}\,\normalsize{6}` E6 * `\mathrm{e}\,6` e6 A small space on either side is perfectly fine and recommended. ### Single Units The symbol of any unit—especially SI units—should follow the form `\mathrm{u}`. (I have this command saved under the keyboard shortcut `usin` on my devices.) For example, * `\mathrm{m}` m * `\mathrm{kg}` kg * `\mathrm{ft.}` ft. Do not use a period with symbolic units; do use a period with abbreviated units. ### Units with a Dot Multiplier Multiplied units conjoined by a dot should follow the form `\mathrm{u}\!\cdot\!\mathrm{v}` u⋅v. (I have this sequence of commands saved under the keyboard shortcut `umul` on my devices.) Because of how `\cdot` is designed (i.e., to separate numbers), the small negative space `\!` on either side maintains uniform spacing throughout the whole compound unit. For example, * `\mathrm{N}\!\cdot\!\mathrm{m}` N⋅m * `\mathrm{s}\!\cdot\!\mathrm{A}` s⋅A Do not use `\times` × as a separator. ### Units with a Solidus Separator Divided units conjoined by a solidus should follow the form `\left.\mathrm{u}\middle/\mathrm{v}\right.` u/v. (I have this sequence of commands saved under the keyboard shortcut `udiv` on my devices.) The extra markdown is to ensure that solidus stretches the entire height of the unit, especially when exponents are involved. For example, * `\left.\mathrm{J}\middle/\mathrm{s}\right.` J/s * `\left.\mathrm{m}\middle/\mathrm{s}^2\right.` m/s2 You may include small negative spaces `\!` on either side of the solidus if you please. ### Exponents Exponents can be rendered with the standard MathJax markdown. The carat and number should immediately follow the closing brace of the `mathrm{}` argument. For example, * `\mathrm{m}^2` m2 * `\left.\mathrm{m}\middle/\mathrm{s}^2\right.` m/s2 ### Parentheses Parentheses can also be rendered with standard MathJax markdown using `\left(` and `\right)` outside the argument of `\mathrm`. For example, * `\left.\mathrm{kg}\!\cdot\!\mathrm{m}^2\middle/\left(\mathrm{C}\!\cdot\!\mathrm{s}\right)\right.` kg⋅m2/(C⋅s) ### Exponents in Place of Separators If you prefer to use no separators and only powers, separator each single `\mathrm{}` with a small space `\,` and use exponents as necessary. For example, * `\mathrm{m}\,\mathrm{s}^{-2}` ms−2 * `\mathrm{s}^{-1}\,\mathrm{mol}` s−1mol ### Examples in Context \mu_0=4\pi\times10^{-7} \ \left.\mathrm{\mathrm{T}\!\cdot\!\mathrm{m}}\middle/\mathrm{A}\right. μ0=4π×10−7 T⋅m/A 180^\circ=\pi \ \mathrm{rad} 180∘=π rad N_A = 6.022\times10^{23} \ \mathrm{mol}^{-1} NA=6.022×1023 mol−1 [Share](/a/27212 "Short permalink to this answer") Share a link to this answer Copy link[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") Follow Follow this answer to receive notifications [edited Apr 6 at 7:20](/posts/27212/revisions "show all edits to this post") community wiki [ 4 revs, 3 users 93% ](/posts/27212/revisions "show revision history for this post")[gen-ℤ ready to perish](/users/347062) 1 * 2 @SamuelMuldoon Please don't use `\mathcal{MathJax}` to write `MathJax`. – [The Amplitwist](/users/915354/the-amplitwist "732 reputation") Apr 6 at 7:22 Add a comment | 1 [2](/questions/5020/mathjax-basic-tutorial-and-quick- reference?page=2&tab=scoredesc#tab-top "Go to page 2") [ Next](/questions/5020/mathjax-basic-tutorial-and-quick- reference?page=2&tab=scoredesc#tab-top "Go to page 2") ## You must [log in](/users/login?ssrc=question_page&returnurl=https%3a%2f%2fmath.meta.stackexchange.com%2fquestions%2f5020) to answer this question. **[Highly active question](/help/privileges/protect-questions)**. Earn 10 reputation (not counting the [association bonus](https://meta.stackexchange.com/questions/141648/what-is-the- association-bonus-and-how-does-it-work)) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity. ## Not the answer you're looking for? Browse other questions tagged * [support](/questions/tagged/support "show questions tagged 'support'") * [faq](/questions/tagged/faq "show questions tagged 'faq'") * [mathjax](/questions/tagged/mathjax "show questions tagged 'mathjax'") * [reference](/questions/tagged/reference "show questions tagged 'reference'") . Welcome! This site is for **discussion** about [Mathematics Stack Exchange](https://math.stackexchange.com). You must have an account there to participate. [Help](/help?mnu=1) * The Overflow Blog * [Announcing OverflowAI](https://stackoverflow.blog/2023/07/27/announcing-overflowai/?cb=1) * Featured * [Moderation strike update, and flags](https://math.meta.stackexchange.com/questions/35823/moderation-strike-update-and-flags?cb=1) [26 people chatting](https://chat.stackexchange.com "26 users active in 24 rooms the last 60 minutes") [Logic](https://chat.stackexchange.com/rooms/44058) 10 mins ago - [simple jack](https://chat.stackexchange.com/users/464429) [![](https://i.stack.imgur.com/FKJeW.jpg?s=128&g=1&g&s=32)](https://chat.stackexchange.com/users/464429)[![](https://lh5.googleusercontent.com/-_fC5uowcqSk/AAAAAAAAAAI/AAAAAAAAAE0/aj- DnDKY69U/photo.jpg?sz=128)](https://chat.stackexchange.com/users/508691)[![](https://www.gravatar.com/avatar/016f3df2c1ded9b52755a1832612b762?s=23&d=identicon&r=PG)](https://chat.stackexchange.com/users/29610)[![](https://www.gravatar.com/avatar/815c036e6a3ed017222544b887aea8f2?s=23&d=identicon&r=PG)](https://chat.stackexchange.com/users/84251) [Wordle/Quordle/Octordle/Nerdle/Semantle Dawdle](https://chat.stackexchange.com/rooms/134394) 27 mins ago - [leslie townes](https://chat.stackexchange.com/users/25973) [![](https://i.stack.imgur.com/CBVYS.jpg?s=128&g=1&g&s=32)](https://chat.stackexchange.com/users/25973)[![](https://i.stack.imgur.com/ofG0x.png?s=128&g=1&g&s=32)](https://chat.stackexchange.com/users/393431)[![](https://www.gravatar.com/avatar/d9f7ec7c7592938fbd5d4b5ee91c8fbb?s=23&d=identicon&r=PG)](https://chat.stackexchange.com/users/558000) #### Linked [ 23 ](https://math.meta.stackexchange.com/q/9906?lq=1 "Question score \(upvotes - downvotes\)") [How can I type the "isomorphic","not equal" and "the set of integers , rationals and reals" symbol?](https://math.meta.stackexchange.com/questions/9906/how-can-i-type- the-isomorphic-not-equal-and-the-set-of-integers-rationals?noredirect=1&lq=1) [ 16 ](https://math.meta.stackexchange.com/q/4473?lq=1 "Question score \(upvotes - downvotes\)") [Striking out equations](https://math.meta.stackexchange.com/questions/4473/striking-out- equations?noredirect=1&lq=1) [ 14 ](https://math.meta.stackexchange.com/q/26403?lq=1 "Question score \(upvotes - downvotes\)") [How to write plus-minus sign in MathJax?](https://math.meta.stackexchange.com/questions/26403/how-to-write- plus-minus-sign-in-mathjax?noredirect=1&lq=1) [ 14 ](https://math.meta.stackexchange.com/q/12777?lq=1 "Question score \(upvotes - downvotes\)") [How to input matrices when posting questions at Math StackExchange?](https://math.meta.stackexchange.com/questions/12777/how- to-input-matrices-when-posting-questions-at-math- stackexchange?noredirect=1&lq=1) [ 8 ](https://math.meta.stackexchange.com/q/22443?lq=1 "Question score \(upvotes - downvotes\)") [How to markup expression using sigma notation for sum in MathJax](https://math.meta.stackexchange.com/questions/22443/how-to- markup-expression-using-sigma-notation-for-sum-in-mathjax?noredirect=1&lq=1) [ 24 ](https://math.meta.stackexchange.com/q/934?lq=1 "Question score \(upvotes - downvotes\)") [where is the latex reference please](https://math.meta.stackexchange.com/questions/934/where-is-the-latex- reference-please?noredirect=1&lq=1) [ 15 ](https://math.meta.stackexchange.com/q/23465?lq=1 "Question score \(upvotes - downvotes\)") [Number sets symbols in Mathjax](https://math.meta.stackexchange.com/questions/23465/number-sets- symbols-in-mathjax?noredirect=1&lq=1) [ 10 ](https://math.meta.stackexchange.com/q/21841?lq=1 "Question score \(upvotes - downvotes\)") [How to type greater than or equal to symbols?](https://math.meta.stackexchange.com/questions/21841/how-to-type- greater-than-or-equal-to-symbols?noredirect=1&lq=1) [ 5 ](https://math.meta.stackexchange.com/q/12660?lq=1 "Question score \(upvotes - downvotes\)") [How to do formatting?](https://math.meta.stackexchange.com/questions/12660/how-to-do- formatting?noredirect=1&lq=1) [ 8 ](https://math.meta.stackexchange.com/q/4497?lq=1 "Question score \(upvotes - downvotes\)") [How to show the integral symbol on this site?](https://math.meta.stackexchange.com/questions/4497/how-to-show-the- integral-symbol-on-this-site?noredirect=1&lq=1) [See more linked questions](https://math.meta.stackexchange.com/questions/linked/5020?lq=1) #### Related [ 6 ](https://math.meta.stackexchange.com/q/10482?rq=1 "Question score \(upvotes - downvotes\)") [Horizontal spacing in aligned equations](https://math.meta.stackexchange.com/questions/10482/horizontal- spacing-in-aligned-equations?rq=1) [ 30 ](https://math.meta.stackexchange.com/q/21071?rq=1 "Question score \(upvotes - downvotes\)") [What to do with edits that "just add dollar signs"?](https://math.meta.stackexchange.com/questions/21071/what-to-do-with- edits-that-just-add-dollar-signs?rq=1) [ 18 ](https://math.meta.stackexchange.com/q/30586?rq=1 "Question score \(upvotes - downvotes\)") [When should each type of vertical bar (pipe) be used?](https://math.meta.stackexchange.com/questions/30586/when-should-each- type-of-vertical-bar-pipe-be-used?rq=1) [ 1 ](https://math.meta.stackexchange.com/q/33010?rq=1 "Question score \(upvotes - downvotes\)") [In MathJax, how can I get the index of a cube root of a tall expression to be at the right level?](https://math.meta.stackexchange.com/questions/33010/in-mathjax-how- can-i-get-the-index-of-a-cube-root-of-a-tall-expression-to-be-at?rq=1) [ 0 ](https://math.meta.stackexchange.com/q/33088?rq=1 "Question score \(upvotes - downvotes\)") [Bringing the new feature to MSE in order to make writing formulas easier](https://math.meta.stackexchange.com/questions/33088/bringing-the-new- feature-to-mse-in-order-to-make-writing-formulas-easier?rq=1) [ 2 ](https://math.meta.stackexchange.com/q/34403?rq=1 "Question score \(upvotes - downvotes\)") [MathJax parentheses that span multiple lines](https://math.meta.stackexchange.com/questions/34403/mathjax- parentheses-that-span-multiple-lines?rq=1) [ 4 ](https://math.meta.stackexchange.com/q/34964?rq=1 "Question score \(upvotes - downvotes\)") [How to typeset a symbol for "the inside of a triangle"?](https://math.meta.stackexchange.com/questions/34964/how-to- typeset-a-symbol-for-the-inside-of-a-triangle?rq=1) #### [ Hot Network Questions ](https://stackexchange.com/questions?tab=hot) * [ Is flying with low-cost carriers (like Batik Air) as safe as other airlines? ](https://travel.stackexchange.com/questions/182682/is-flying-with-low-cost-carriers-like-batik-air-as-safe-as-other-airlines) * [ On the error term of the Riemann explicit formula ](https://mathoverflow.net/questions/451823/on-the-error-term-of-the-riemann-explicit-formula) * [ Can you perform swaps? ](https://codegolf.stackexchange.com/questions/263496/can-you-perform-swaps) * [ How to create xml string for each row of table? ](https://dba.stackexchange.com/questions/329823/how-to-create-xml-string-for-each-row-of-table) * [ How to deal with differentials? ](https://physics.stackexchange.com/questions/774258/how-to-deal-with-differentials) * [ Number of bits needed to represent the product of the first primes ](https://codegolf.stackexchange.com/questions/263531/number-of-bits-needed-to-represent-the-product-of-the-first-primes) * [ What is this type of small tab-like connector called? ](https://electronics.stackexchange.com/questions/675968/what-is-this-type-of-small-tab-like-connector-called) * [ What preparations to make before changing oil on old neglected tractor diesel engine ](https://mechanics.stackexchange.com/questions/93549/what-preparations-to-make-before-changing-oil-on-old-neglected-tractor-diesel-en) * [ Concerning a binary system of stars/planets/black holes could one of them be ejected before eventually merging or colliding? ](https://astronomy.stackexchange.com/questions/54344/concerning-a-binary-system-of-stars-planets-black-holes-could-one-of-them-be-eje) * [ Should I be concerned about these warm, seemingly blackened receptacles in a bedroom? ](https://diy.stackexchange.com/questions/278129/should-i-be-concerned-about-these-warm-seemingly-blackened-receptacles-in-a-bed) * [ Do schools have permission to use pictures containing my face taken inside school forever if I agreed to it? ](https://law.stackexchange.com/questions/94306/do-schools-have-permission-to-use-pictures-containing-my-face-taken-inside-schoo) * [ Is my logo kerned right? ](https://graphicdesign.stackexchange.com/questions/161741/is-my-logo-kerned-right) * [ Did active frontiersmen really eat 20,000 calories a day? How does this compare to other highly-active people in recorded history? ](https://history.stackexchange.com/questions/72060/did-active-frontiersmen-really-eat-20-000-calories-a-day-how-does-this-compare) * [ Dynamic and Static scoping and recursion ](https://langdev.stackexchange.com/questions/2628/dynamic-and-static-scoping-and-recursion) * [ What properties should I look for to find a balance potentiometer for a vintage hi-fi? ](https://electronics.stackexchange.com/questions/675978/what-properties-should-i-look-for-to-find-a-balance-potentiometer-for-a-vintage) * [ Troubleshooting rotation with curve having Vector handle type ](https://blender.stackexchange.com/questions/298134/troubleshooting-rotation-with-curve-having-vector-handle-type) * [ Translation: "In the past, I often encountered hungry (badly) people" ](https://chinese.stackexchange.com/questions/55001/translation-in-the-past-i-often-encountered-hungry-badly-people) * [ What is a good sight picture for telling urban vs rural areas (wrt minimum AGL)? ](https://aviation.stackexchange.com/questions/100237/what-is-a-good-sight-picture-for-telling-urban-vs-rural-areas-wrt-minimum-agl) * [ Why does this sentence have a "back": "Loving India back since 1924." ](https://ell.stackexchange.com/questions/339594/why-does-this-sentence-have-a-back-loving-india-back-since-1924) * [ Is it legal for a train company to create an art gallery using photographs of the graffiti on their locomotives and train cars? ](https://law.stackexchange.com/questions/94333/is-it-legal-for-a-train-company-to-create-an-art-gallery-using-photographs-of-th) * [ "Pure Copyleft" Software Licenses? (with no additional restrictions) ](https://opensource.stackexchange.com/questions/14157/pure-copyleft-software-licenses-with-no-additional-restrictions) * [ Is it OK to ask the conference chair to waive the registration fee? ](https://academia.stackexchange.com/questions/200064/is-it-ok-to-ask-the-conference-chair-to-waive-the-registration-fee) * [ Electric oven is not working since installation. Is it a faulty product or installation issue? ](https://diy.stackexchange.com/questions/278198/electric-oven-is-not-working-since-installation-is-it-a-faulty-product-or-insta) * [ How do I create a marshmallow twist shape with multiple colours? ](https://blender.stackexchange.com/questions/298146/how-do-i-create-a-marshmallow-twist-shape-with-multiple-colours) [ Question feed ](/feeds/question/5020 "Feed of this question and its answers") # Subscribe to RSS Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
##### [Mathematics Meta](/) * [Help](/help) * [Chat](https://chat.stackexchange.com?tab=site&host=math.stackexchange.com) * [Contact](/contact) ##### [Company](https://stackoverflow.co/) * [Stack Overflow](https://stackoverflow.com) * [Teams](https://stackoverflow.co/teams/) * [Advertising](https://stackoverflow.co/advertising/) * [Collectives](https://stackoverflow.co/collectives/) * [Talent](https://stackoverflow.co/talent/) * [About](https://stackoverflow.co/) * [Press](https://stackoverflow.co/company/press/) * [Legal](https://stackoverflow.com/legal) * [Privacy Policy](https://stackoverflow.com/legal/privacy-policy) * [Terms of Service](https://stackoverflow.com/legal/terms-of-service) * Cookie Settings * [Cookie Policy](https://stackoverflow.com/legal/cookie-policy) ##### [Stack Exchange Network](https://stackexchange.com) * [ Technology ](https://stackexchange.com/sites#technology) * [ Culture & recreation ](https://stackexchange.com/sites#culturerecreation) * [ Life & arts ](https://stackexchange.com/sites#lifearts) * [ Science ](https://stackexchange.com/sites#science) * [ Professional ](https://stackexchange.com/sites#professional) * [ Business ](https://stackexchange.com/sites#business) * [ API ](https://api.stackexchange.com/) * [ Data ](https://data.stackexchange.com/) * [Blog](https://stackoverflow.blog?blb=1) * [Facebook](https://www.facebook.com/officialstackoverflow/) * [Twitter](https://twitter.com/stackoverflow) * [LinkedIn](https://linkedin.com/company/stack-overflow) * [Instagram](https://www.instagram.com/thestackoverflow) Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under [CC BY-SA](https://stackoverflow.com/help/licensing). rev 2023.7.31.43551 Your privacy By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our [Cookie Policy](https://stackoverflow.com/legal/cookie-policy). Accept all cookies Necessary cookies only Customize settings