Why doesn't Maple recognize matrix in list?

AI Thread Summary
The discussion revolves around issues encountered while using Maple to manipulate matrices defined in lists. Users report difficulties with operations like finding the inverse or transposing a matrix, particularly when the matrix is not square. It is noted that commands in Maple are case-sensitive, which affects functionality, and that results must be stored in variables to be visible. The importance of loading the correct packages, such as LinearAlgebra or MTM, is emphasized for successful matrix operations. Additionally, users share tips on how to set defaults for matrix types and clarify the purpose of the "restart" command in Maple.
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
 
Back
Top