Enter a matrix - Maple Help

How Do I

 Enter a Matrix?

Entering matrices in Maple is very simple. This section demonstrates two methods for entering a matrix: by inserting a template from the Matrix palette and by using the Matrix-constructor shortcut syntax.

Before you proceed, be sure to familiarize yourself with entering simple mathematical expressions. Open a new worksheet in Document mode, and ensure that you are in Math mode.

Using the Matrix Palette to Create a Template

Follow the steps below to enter the three-by-four matrix $\left[\begin{array}{cccc}1& 2& 3& 6\\ 4& 5& 6& 15\\ 7& 8& 9& 24\end{array}\right]$ and assign it to a variable whose name is $M$.

Step

Description

Illustration

1

Type $M$, followed by a colon (:) and an equal sign (=). The colon-equals notation assigns the content on the right-hand side to a variable on the left-hand side.

2

In the Matrix palette, either:

 • Click and hold the Choose... button and drag a three-by-four rectangle in the box that pops up, or
 • Type $3$ into the Rows field and $4$ into the Columns field.

3

Click Insert Matrix.

4

Type $1$ over the highlighted placeholder. To move to and highlight the next placeholder, press the Tab key.

5

Continue to navigate through the placeholders by pressing Tab to enter values for the entire matrix.

6

Press Enter. Maple displays and labels the result of an executed statement in a new line. (For more information, see the How do I topic on evaluating expressions and the Equation Labels subsection of the How Do I help page under the Tools and Features heading.)

When Working with Templates From the Palettes, Keep These Tips in Mind:

 • If you accidentally move the cursor outside a template, simply move the cursor back into the template and press [Tab] to move to the next placeholder.
 • Use Shift + Tab to move back to the previous placeholder, if you have not overwritten it yet.
 • To add a row to a template, place the cursor in an element and from the Context Panel, select Insert Row. Alternatively, press Ctrl+Shift+R.
 • To add a column to a template, place the cursor in an element and from the Context Panel, select Insert Column. Alternatively, press Ctrl+Shift+C.

Using Maple's Matrix-constructor Shortcut Syntax

Follow the steps below to enter the three-by-four matrix $\left[\begin{array}{cccc}1& 2& 3& 6\\ 4& 5& 6& 15\\ 7& 8& 9& 24\end{array}\right]$ and assign it to a variable whose name is $M$. For details about the special syntax used in these steps, see the associated help topic.

 Step Description Illustration 1 Type $M$, followed by a colon (:) and an equal sign (=). The colon-equals notation assigns the content on the right-hand side to a variable name on the left-hand side. 2 Type two left angle brackets (<) (<), followed by $1,4,7$ (separated by commas), and a right angle bracket (>). The expression $⟨1,4,7⟩$ represents the first column of the final matrix. 3 Press Shift + | to type the pipe character (|). This character separates the four columns in the final matrix. 4 As before, type the columns $⟨2,5,8⟩$, $⟨3,6,9⟩$, and $⟨6,15,24⟩$, separated by pipe characters (|). Type a final right angle bracket (>). The angular brackets are automatically formatted by Maple. 5 Press Enter. Maple displays and labels the result of an executed statement in a new line. (For more information, see the How do I topic on evaluating expressions and the Equation Labels subsection of the How Do I help page.)

When Working with this Shortcut Syntax, Keep These Tips in Mind:

 • The comma (,) is used to separate elements in different rows, while the pipe symbol (|) is used to separate elements in different columns.
 • As a result, the matrix could also be entered as $⟨⟨1|2|3|6⟩,⟨4|5|6|15⟩,⟨7|8|9|24⟩⟩$.

 • The methods described in this help page provide simple ways to enter matrices with a small number of entries.  For more ways to enter a Matrix, including using an initializer or importing data, see How to Construct Matrices in Maple.
 • For access to a wide range topics about working with matrices, see LinearAlgebra Package Help Index.
 Related Topics The How Do I... topics cover the essentials for doing mathematics in Maple. Learn more about available tools and features, such as palettes and the context panel. Refer to Help>Quick Reference for basic Getting Started tips.