# Connecting array elements with lines

This is admittedly a bit of an abuse of MathJax, but I'm trying to use it to draw lines to connect dots within a rectangular array.

I can easily get an array of dots, but I can't figure out a way to draw lines connecting them:

$$\begin{matrix} \bullet&\bullet&\bullet\\ \bullet&\bullet&\bullet\\ \bullet&\bullet&\bullet\\ \end{matrix}$$

I tried horizontal and vertical strikeouts, but they don't span from one array element to the next, and they also overlap the corners:

$$\require{enclose} \begin{matrix} \enclose{verticalstrike,horizontalstrike}{\bullet}&\enclose{verticalstrike,horizontalstrike}{\bullet}&\bullet&\\ \enclose{verticalstrike,horizontalstrike}{\bullet}&\enclose{verticalstrike,horizontalstrike}{\bullet}&\bullet\\ \bullet&\bullet&\bullet\\ \end{matrix}$$

I'm trying to accomplish something like this:

Is this possible using MathJax?

• Sorry, you have the wrong website. This site, meta.math.stackexchange.com, is for discussing math.stackexchange.com. – Gerry Myerson Nov 2 '15 at 22:39
• @GerryMyerson I understand that, but there seem to be many other MathJax-related questions here, and there's even a tag for them. How does this question differ from those? – GentlePurpleRain Nov 2 '15 at 22:40
• A question about how MathJax is implemented on math.stackexchange.com could be on-topic. That's the difference. Have you considered tex.stackexchange? I don't know anything about that site, but it might be worth a look. – Gerry Myerson Nov 2 '15 at 22:44
• @GerryMyerson Thanks for the clarification. I have edited my question accordingly. – GentlePurpleRain Nov 2 '15 at 22:48
• Editing out the reference to Puzzling.se doesn't suddenly make your question on-topic for meta.math.se – Gerry Myerson Nov 2 '15 at 22:48
• @GerryMyerson I will check out Tex.SE as well. – GentlePurpleRain Nov 2 '15 at 22:49
• @GerryMyerson For the most part, MathJax is off-topic on TeX - LaTeX since it's not TeX or its variants. – user147263 Nov 2 '15 at 22:50
• @GerryMyerson I understand, and will try elsewhere. However, if this question had originally appeared here in its current form, would you have thought it off-topic? – GentlePurpleRain Nov 2 '15 at 22:51
• Even in its current form, it doesn't relate to math.se, so (in my opinion) it's off-topic on meta.math.se. – Gerry Myerson Nov 3 '15 at 0:46
• Have you looked at the huge Mathjax thread on this meta? amscd (for commutative diagrams) is likely as good as it's going to get (but would leave gaps), unless you spend hours going crazy with v and hskips or some other terrible thing. – pjs36 Nov 3 '15 at 5:35
• Just use Inkscape, GIMP, Paint, whatever you want. MathJaX simply isn't designed for this. Maybe you'll manage to get what you want, but it will be through horrible tricks that will take hours to achieve when it would take minutes to produce the same picture with usual drawing software. – Najib Idrissi Nov 3 '15 at 8:35
• This is somewhat related: Is there a way to draw a graph (vertices & edges) in LaTeX on this website?. (Ant try to have a look at other posts shown among linked and related questions in the sidebar.) – Martin Sleziak Nov 3 '15 at 12:48
• Some very simple graphs can probably be drawn as commutative diagrams. It is possible to create some simple commutative diagrams using MathJax, but the possibilities are rather limited: How to draw a commutative diagram?. This answer links a website where you can use xypic syntax to create commutative diagrams online. (And then you can embed them as a picture.) – Martin Sleziak Nov 3 '15 at 12:51