I’m trying to use Mathematica to work my way through some Linear Algebra problems given by Gilbert Strang (Introduction to Linear Algebra). Consequently, I would like to use his notation as much as possible, in part, to learn better how to typeset using Mathematica and potentially to develop a complete set of answers to his problem sets using Mathematica rather than Matlab or R that mimics the look of his text.

Traditional form using Mathematica will place a parentheses () around a matrix or column vector, which is a common representation to recognize an array as a matrix (column vector). However, Strang uses brackets [], another common notation to reflect a matrix.

In a previous question regarding TraditionalForm some suggested that in the cases of functions one could use one of several user-defined functions to do this.

`tF = RawBoxes[ToBoxes[TraditionalForm[#]] /. {"(" -> "[", ")" -> "]"}] &; tF2 = Module[{f = ToString@#2}, RawBoxes[MakeBoxes[TraditionalForm[#]] //. RowBox[{f, "(", else___, ")"}] :> RowBox[{"f", "[", else, "]"}]]] &; makeBracketsF[f_] := (f /: MakeBoxes[f[a___], TraditionalForm] := RowBox[{ToString@f, "[", MakeBoxes[Row[{a}, ","], TraditionalForm], "]"}]) `

However, the last two fail, as either the slot can not be filled with a matrix (column vector) with more than two rows, or the Traditional form is protected and can not be passed from the Module. The first answer gets close, but the bracket only surrounds the central value and does not encompass all three values, making the output look funky rather than typeset.

Is there a way to accomplish this seemingly simple substitution to permit a more flexible use of Traditional form to surround a matrix with a suitably sized pair of brackets to conform to a widely used traditional form for matrices?