Specifically, I'd like to create a matrix such as
$\left[\begin{array}{cc|c}
a_{1} & a_{2} & a_{3}\\
b_{1} & b_{2} & b_{3}\\
c_{1} & c_{2} & c_{3}
\end{array}\right]$
But in an arbitrary fashion in LyX. I'd like to do this in a way the utilizes the fact that LyX displays the 'boxes' where one can put in numbers, as opposed to typing it in beforehand. Although, I'd be fine in doing it without that feature. So far, I've only been able to create a very basic macro in my own .sty file defining a 2x2 matrix but I cannot get LyX to display the 'boxes' and can only get the macro to work if I add in curly braces and put in the numbers myself.
I should add that I'm decent at LyX and TeX, but no expert by any stretch of the imagination. My use is restricted to its capabilities as a note taking device, as my handwriting has always been illegible. However, I can follow some of the technical jargon, so don't be too afraid to throw something at little specific at me!
Thanks in advance!
a
,b
andc
meant to be the parameters to your macro? If so\newcommand\MyMat[3]{\ensuremath{\left[\begin{array}{cc|c} {#1}_{1} & {#1}_{2} & {#1}_{3}\\ {#2}_{1} & {#2}_{2} & {#2}_{3}\\ {#3}_{1} & {#3}_{2} & {#3}_{3} \end{array}\right]
is what you want.