Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How I can build a palette of matrices?. So, I would like a palette with a 3x3 square matrix, a square matrix 4x4, 1x3 row matrix, 1x4 matrix row, column matrix 3x1 and 4x1 column matrix.

share|improve this question

Using PasteButton with a matrix containing the desired matrix is one option.

PasteButton["3x3 Matrix", MatrixForm@( {
    {\[Placeholder], \[Placeholder],\[Placeholder]},
    {\[Placeholder], \[Placeholder],\[Placeholder]},
    {\[Placeholder], \[Placeholder],\[Placeholder]}
   } )]
PasteButton["1x3 Matrix", MatrixForm@( {
    {\[Placeholder], \[Placeholder],\[Placeholder]}
   } )]
PasteButton["3x1 Matrix", MatrixForm@( {
    {\[Placeholder]}, {\[Placeholder]},{\[Placeholder]}
   } )]

The 4x4, 1x4, and 4x1 matrices can be made in an analogous fashion. To put them in a palette:

CreatePalette[{PasteButton["3x3 Matrix", 
   MatrixForm@({{\[Placeholder], \[Placeholder], \[Placeholder]}, {\
\[Placeholder], \[Placeholder], \[Placeholder]}, {\[Placeholder], \
\[Placeholder], \[Placeholder]}})],
  PasteButton["1x3 Matrix", 
   MatrixForm@({{\[Placeholder], \[Placeholder], \[Placeholder]}})],
  PasteButton["3x1 Matrix", 
   MatrixForm@({{\[Placeholder]}, {\[Placeholder]}, \
share|improve this answer

The "Basic Math Assistant" palette built into the last few versions does most of what you need, except that it starts from a 2 by 2 matrix and builds rows and columns from there.

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.