Why doesn't Maple recognize matrix in list?

Click For Summary

Discussion Overview

The discussion revolves around issues encountered while using Maple to manipulate matrices, specifically regarding the recognition of matrices within lists and operations such as transposition and inversion. Participants explore the functionality of different packages and commands in Maple, addressing both practical usage and underlying technical concerns.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses frustration with Maple not recognizing a matrix defined in a list and seeks help with commands that return the input instead of performing operations.
  • Another participant suggests that the MTM package needs to be loaded and provides a command sequence to check the type of the matrix.
  • Concerns are raised about attempting to compute the inverse of a non-square matrix, with some participants questioning the necessity of such an operation.
  • There is a suggestion that the issue with the transpose operation may stem from not storing the result in a variable, prompting a recommendation to assign the output to a new variable.
  • Participants note that case sensitivity in commands affects functionality, specifically mentioning the difference between "Transpose" and "transpose."
  • One participant mentions that using the 'inv' function may resolve issues with calculating the inverse of a matrix.
  • Another participant discusses the distinction between the LinearAlgebra and Student Linear Algebra packages, noting that one worked while the other did not in their experience.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to resolve the issues with Maple. There are multiple competing views regarding which packages to use and how to handle matrix operations, indicating that the discussion remains unresolved.

Contextual Notes

Some limitations are noted, such as the dependence on specific packages and the case sensitivity of commands. There is also uncertainty regarding the functionality of different Maple packages and their effects on matrix operations.

flyingpig
Messages
2,574
Reaction score
1

Homework Statement



I am basically just trying to resolve this matrix in maple by using a list because for a big system, there is no way I am entering all the numbers one by one and only to find out later my size was wrong.

So for instance

A := matrix([[2,3,3,0],[3,1,4,9]])

Now for some reason, (and I already loaded the packages), once you hit enter, you cannot do anything to A

So for instance

Code:
>A^-1
>1/A
>Transpose(A)
>Transpose(A)

It returns my command.


Anyone got a clue? Also does anyone know how to set the default for 1-column matrices to MATRICES and NOT vectors? Getting tired of Maple's automatic switches
 
Physics news on Phys.org
Install need the MTM package. Try this:

> restart; with(MTM);
> A := matrix([[2, 3, 3, 0], [3, 1, 4, 9]]);
> transpose(A);
> type(A, matrix);

Of course A-1 doesn't work since the matrix isn't square. And don't forget commands are case sensitive. No capital T on transpose.
 
flyingpig said:

Homework Statement



I am basically just trying to resolve this matrix in maple by using a list because for a big system, there is no way I am entering all the numbers one by one and only to find out later my size was wrong.

So for instance

A := matrix([[2,3,3,0],[3,1,4,9]])

Now for some reason, (and I already loaded the packages), once you hit enter, you cannot do anything to A

So for instance

Code:
>A^-1
>1/A
>Transpose(A)
>Transpose(A)

It returns my command.


Anyone got a clue? Also does anyone know how to set the default for 1-column matrices to MATRICES and NOT vectors? Getting tired of Maple's automatic switches

I haven't used Maple for a very long time, but I'll take a stab at your questions, for what it's worth.

1. I don't know why you even tried to get A-1, since A is not a square matrix.
Even if A were a square matrix, you might have problems with A^-1. I would put parentheses around the exponent to see if that made a difference.

2. For Transpose(A), I'm going to guess that Maple is doing the calculation, but since you didn't tell Maple where to store the result, you don't see anything. I would try B = Transpose(A).
 
LCKurtz said:
Install need the MTM package. Try this:

> restart; with(MTM);
Wow, I have never even seen that one before. Looked it up on Maple Help, still don't know what it is, but it works! By the way, what does "restart" do? Because I tried it without restart and it still worked
LCKurtz said:
No capital T on transpose.

No it worked when I loaded (the original) package with(LinearAlgebra) or Student Linear Algebra

Mark44 said:
2. For Transpose(A), I'm going to guess that Maple is doing the calculation, but since you didn't tell Maple where to store the result, you don't see anything. I would try B = Transpose(A).

1. I don't know why you even tried to get A-1, since A is not a square matrix.
Even if A were a square matrix, you might have problems with A^-1. I would put parentheses around the exponent to see if that made a difference.

I use Maple 15, they've managed to get across those problems storing factor thankfully.

And yes, I forgot that my matrix wasn't square, but even if it were square, it didn't work.

Here is the full code that I used originally

Code:
>with(LinearAlgebra):
>A := matrix([[2, 3, 3, 0], [3, 1, 4, 9]])
>Transpose(A)
>Error, (in LinearAlgebra:-Transpose) invalid input: LinearAlgebra:-Transpose expects its 1st argument, A, to be of type {Matrix, Vector, scalar} but received A[/color]

Pink was the error message returned to me

EDIT: for some reason transpose (lower case t) also works, but for a square matrix, B^-1 still doesn't work
 
flyingpig said:
Wow, I have never even seen that one before. Looked it up on Maple Help, still don't know what it is, but it works! By the way, what does "restart" do?

Restart re-initializes the worksheet. It is handy when you have made a bunch of changes and want Maple to start over with brand new uncorrupted variables. I always put it at the top of a worksheet so when I tell Maple to re-execute the worksheet it begins with new variables.
 
flyingpig said:
EDIT: for some reason transpose (lower case t) also works, but for a square matrix, B^-1 still doesn't work

Use inv(A) for the inverse.
 
OKay I did this again today, but it's not working again.

I introduced

Code:
with(LinearAlgebra):
with(MTM):

And I listed out the matrix in

T0:= matrix([[...]])T1:=Pivot(MultiplyRow(T0,...,..)...,...)

EDIT; never mind, for some reason it worked with STUDENT Linear Algebra. I don't even know why they separate the two packages
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
10K
  • · Replies 8 ·
Replies
8
Views
20K
  • · Replies 1 ·
Replies
1
Views
2K