# How to draw simple lattice diagrams (MathJax syntax)

I recently asked a question on TeX SE about how to draw lattice diagrams with MathJax (as in, the TeX commands for creating one, once I already drew it on paper and know what it should look like). Unfortunately I learned that MathJax isn't really what they cover over there. Then, I searched through the documentation but I couldn't find anything either.

So I ask here instead, and my question is: How do I code a lattice such as the following (this one is just an image) so it'll work on Math SE?:

I'll also accept a redirect to a helpful page. Here is a link to the original question: https://tex.stackexchange.com/questions/219005/help-on-simple-lattice-diagrams?noredirect=1#219029

Edit: The term I should be using is Hasse Diagram.

## migrated from math.stackexchange.comDec 22 '14 at 23:43

This question came from our site for people studying math at any level and professionals in related fields.

• @Arkamis So it seems there's not an easy way. Disheartening, but helpful anyways. – GPerez Dec 22 '14 at 1:13
• Unfortunately so. The easiest way might be to become familiar with some of the LaTeX commutative diagramming tools and use a service such as ShareLaTeX to code up the image. From there, it's easy enough to embed the image in a question. – Emily Dec 22 '14 at 1:17
• For bonus points, you could make public the tex document and provide a link so others could edit. – Emily Dec 22 '14 at 1:18
• @Arkamis Thank you, I will try that. – GPerez Dec 22 '14 at 1:22
• @Arkamis Bonus points counter-offer: Do you know of any other relevant tags to add? I couldn't find any syntax-related ones. – GPerez Dec 22 '14 at 1:23
• Most questions pertaining to Mathjax usage are generally considered to belong on Meta, actually. – Emily Dec 22 '14 at 1:24
• @Arkamis Ah, that's good to know. Is there a way I can migrate it (so the comments and answers still appear)? – GPerez Dec 22 '14 at 1:27
• You can flag and just comment that it should be migrated. But since this question has an accepted answer, I'd just let it be. Eventually someone else will search for what you're asking on main, and they might come across this question. – Emily Dec 22 '14 at 1:29
• This post has an example with TikZ and TikZ-cd on making a lattice type diagrams. – dustin Dec 22 '14 at 21:59
• The technical term is Hasse diagram. – Michael Greinecker Dec 23 '14 at 0:05
• – Martin Sleziak Dec 23 '14 at 7:07
• For what it's worth, MathJax was never really meant for this sort of thing. (Not as of today, at least, though perhaps it will be in the future.) It's meant as a way to render simple formulas, not as a complete in-browser implementation of (La)TeX; in fact the only reason MathJax has anything to do with TeX is that the LaTeX/AMSTeX syntax for math is the one that most professionals are familiar with. – David Z Dec 27 '14 at 7:34
• FWIW, the reason why MathJax currently does not easily draw more advanced diagrams, in particular diagonal arrows, is that our underlying format is MathML which does not easily lend itself to that. In the long run, we hope to add SVG-based extensions as part of core MathJax. E.g. the third party xyjax extension provides much of xypic (using SVG). – Peter Krautzberger Dec 30 '14 at 7:38
• It seems that many users who need similar diagrams (field extensions or Galois theory or subgroups or Hasse diagrams in general) include them in images. – Martin Sleziak Oct 7 '16 at 2:06
• One possibility would be to ask also in comments to some of those posts what software the particular poster used, but I am not sure whether you will learn something which is not already covered in some of the several meta posts on this or closely related topics). – Martin Sleziak Oct 7 '16 at 2:06

## 2 Answers

Probably, not the best solution, but you could make a matrix:

$$\begin{matrix} && \Bbb Q(\sqrt{2},i) & \\ &\huge\diagup & \huge| & \huge\diagdown \\ \Bbb Q(\sqrt{2}) & & \Bbb Q(i\sqrt{2})& & \Bbb Q(i)\\ &\huge\diagdown & \huge| & \huge\diagup \\ &&\Bbb Q \end{matrix}$$

Code:

\begin{matrix} && \Bbb Q(\sqrt{2},i) & \\ &\huge\diagup & \huge| & \huge\diagdown \\ \Bbb Q(\sqrt{2}) & & \Bbb Q(i\sqrt{2})& & \Bbb Q(i)\\ &\huge\diagdown & \huge| & \huge\diagup \\ &&\Bbb Q \end{matrix}

• This is quite nice for my purposes actually! I'll accept once somebody confirms this is the most viable solution, or if that takes too long. Edit: Comments above just confirmed I guess. – GPerez Dec 22 '14 at 1:16

As suggested in the comments, I've researched a few basic commutative diagramming tools and eventually settled with TikZ. To be able to "use" this on Math SE you have to create a TeX document and upload the image.

Here's the practice diagram I made, feel free to add comments or edit: https://www.sharelatex.com/project/5497f54cb42cfdce7700e3f0 Edit: I guess making sharelatex links public leads to drastic modifications.