# Question:why convert(array,Matrix) display is different?

## Question:why convert(array,Matrix) display is different?

Maple 2022

I have an Array A which I wanted to convert to Matrix. Doing B:=convert(A,Matrix); displays different on the screen than if A is first converted to list, then the list is next converted to Matrix.

Also the dimension in the first case if not the same as the dimension of the matrix done using the list conversion first. I expected both to give same dimension which is 10 by 3 in this example.

Should not both be the same? Does this to convert an Array to Matrix, one first needs to convert it to list, then convert the list to Matrix?

ps. thinking more about this, I think this seems to work as designed. I just expected convert to Matrix to generate the standard 2 dimensional matrix  10 by 3 automatically from the Array, but I see now that it probably does need that extra conversion to a list first.

 > interface(version);

 > restart;
 > A:=Array(1..0); for i from 1 to 10 do    A ,= [i, i+1, i+2] od: B:=convert(A,Matrix); whattype(B); LinearAlgebra:-Dimension(B);

 > restart; A:=Array(1..0); for i from 1 to 10 do    A ,= [10-i, i+1, i+2] od: B:=convert(A,list); B:=convert(B,Matrix); whattype(B); LinearAlgebra:-Dimension(B);

 >
 >