# Why doesn't Maple recognize matrix in list?

## 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

Related Engineering and Comp Sci Homework Help News on Phys.org
LCKurtz
Homework Helper
Gold Member
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.

Mark44
Mentor

## 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).

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)
>[color=pink]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

LCKurtz
Homework Helper
Gold Member
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.

LCKurtz
Homework Helper
Gold Member
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