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
Using Maple's Matrix-constructor Shortcut Syntax
Additional Resources
Related Topics
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 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.
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.
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.
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.
Press Shift + | to type the pipe character (|). This character separates the four columns in the final matrix.
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.
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.
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.
How Do I...
...Enter a Complex Number?
...Enter a Function?
...Enter a Simple Expression?
...Evaluate an Expression?
...Import Tabular Data?
...Plot a Function?
...Plot a Straight Line?
...Plot Multiple Functions?
...Solve an Ordinary Differential Equation?
...Work with Random Generators?
Tools and Features
Palettes
Context Panel
Command Completion
Equation Labels
Assistants
Maple Help
Plotting Guide
Applications
Example Worksheets
Manuals
Refer to Help>Quick Reference for basic Getting Started tips.
See Also
MaplePortal
assignment
functional operators
Matrix shortcuts
Use the Matrix Palette
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