# Writing Math equations in MSE. [duplicate]

How do I write the mathematical equations in a question, here on stack exchange?

When I try to write a question which involves equations, I get stuck as I don't know how to input those equations...

• If you basic LaTeX/amsmath, it is usually the same code (equations numbering is not automatic: you have to use \tag{some number/symbol}). – Bernard Jul 12 '20 at 13:19
• If you want to know how a particular equation is formatted (i.e. to help you learn), you can press "improve this question/answer" to see how it was written, or you can right-click on a particular formatted block (you should see a pop-up menu) and press Show Math As $\to$ TeX Commands to see the code used. Put this code between $ signs for inline maths (e.g.$a + b^2 = 10$) or $$ signs for equations that take their own line, e.g.$$\int_{-\infty}^\infty e^{-x^2} \, \mathrm{d}x = \sqrt{\pi}.$\$ – user804886 Jul 12 '20 at 14:58
• Yes that's good! – Harrison Wells Jul 12 '20 at 21:25

For those with little experience in LaTeX, the best on-site source to consult is mathjax basic tutorial and quck reference. This site uses MathJax software and MathJax relies a lot on LaTeX commands (not all), surrounded by dollar-signs. The tutorial will help you get up to speed in no time.

When I started here, I became very familiar with MathJax by studying the tutorial, and suggesting edits to posts, using what I learned. Until a user has earned 2000 in rep, any successful edit will earn you 2 reputation points. It's a great way to practice what you're learning.

Also, whenever you see something formatted and want to know how to do that, you can "right-click" on the formatted expression/equation, choose "show math as..." and then choose "TeX", and you'll be able to see and or copy the formatting.

• To see the source you can also click on "edit". I find this more useful, as you get to see the bigger picture (including how links are formatted, etc.). – user1729 Jul 12 '20 at 21:04
• True, @user1729, provided the equation of interest is in a question or answer. But sometimes knowing to right click is useful across questions, answers, AND COMMENTS. – amWhy Jul 12 '20 at 21:07