I have been tinkering with the Atto Equation editor (MathJax and TeX) in part to fix the 2x2 Matrix button (MDL-45067). As a result, I came to the conclusion that matrices were perhaps too specialist and complex for the general Equation editor and developed a separate Matrix editor that can be added to the Atto editor toolbar.
The Matrix editor supports a range of symbols, flexible and fixed-size brackets, braces and delimiters and includes templates for 1xn, 2,n, 3xn and mxn matrices and arrays. Also, includes small (inline) matrices.
So, you can add similar to the following to your Moodle content with a few clicks:
Currently, can be downloaded from GitHub:
and will hopefully become available from the Moodle plugins Repository.
Atto toolbar icon for matrix editor:Screenshot: