Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

2 Answers 2

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]}, \
{\[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

 
discard

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.