# How to align on same line 2 equations with MathJax

I would like to align the 2 below equations on the same line with MathJax :

$$H_{x}= \begin{pmatrix} 1 & 2 & 1 \\ 0 & 0 & 0\\ -1 & -2 & -1 \end{pmatrix}$$

$$H_{y}= \begin{pmatrix} -1 & 0 & 1 \\ -2 & 0 & 2\\ -1 & 0 & 1 \end{pmatrix}$$


I tried with \begin{align} and \begin{multicols}{2} but none works with MathJax.

Anyone could have a solution ?

• While mathjax uses LaTeX syntax, it uses Javascript and HTML's DOM model rather than TeX technology, making it mostly off topic for this site. You might try instead searching among the questions tagged with mathjax on Stack Overflow, or in the official mathjax-users Google group. – Dai Bowen Oct 10 '16 at 22:40
• as in latex just delete the middle – David Carlisle Oct 10 '16 at 22:44
• See this... – Werner Oct 10 '16 at 22:53
• close voters: I see no reason to close a question off topic just because it mentions mathjax if the question and answer apply equally to latex – David Carlisle Oct 10 '16 at 23:06

mathjax-specific questions are off topic but the markup here is just as in latex, and the answer is the same, you want one equation environment not two
$$H_{x}= \begin{pmatrix} 1 & 2 & 1 \\ 0 & 0 & 0\\ -1 & -2 & -1 \end{pmatrix} %$$
%$$H_{y}= \begin{pmatrix} -1 & 0 & 1 \\ -2 & 0 & 2\\ -1 & 0 & 1 \end{pmatrix}$$