Use R ::= QQ[x,y];
L := [[1,2],[3,4]];
Mat(L);
Mat([
[1, 2],
[3, 4]
])
-------------------------------
M := Module([x,x^2,y],[x^2,y,0]);
Mat(M);
Mat([
[x, x^2, y],
[x^2, y, 0]
])
-------------------------------
Mat([[1,2],[3,4]]);
Mat([
[1, 2],
[3, 4]
])
-------------------------------
Mat[[1,2],[3,4]]; -- only square brackets is obsolescent!
Mat([
[1, 2],
[3, 4]
])
-------------------------------
-- a slightly more obscure example: allowed, but discouraged!
M := Mat([["a","b"],["c",[1,2]]]);
N := Mat([["d","e"],["f",[3,4]]]);
M+N;
Mat([
["ad", "be"],
["cf", [4, 6]]
])
-------------------------------
|