Close
Close window
Enter a matrix - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

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 12364561578924 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 Tabkey.

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 12364561578924 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&comma;4&comma;7 (separated by commas), and a right angle bracket (>). The expression 1&comma;4&comma;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&comma;5&comma;8, 3&comma;6&comma;9, and 6&comma;15&comma;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&verbar;2&verbar;3&verbar;6&comma;4&verbar;5&verbar;6&verbar;15&comma;7&verbar;8&verbar;9&verbar;24.

Additional Resources

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

Note for non-Windows users: The keystrokes given in this document are for Windows. There will be differences for other platforms. If you are using a different platform, see Shortcut Keys .


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /