> with(linalg);
> A:=matrix(2,3,[[1,2,3],[2,4,5]]);
A
:=
[ 1
2
3 ]
[ 2
4
5 ]
> B:=matrix(2,3,[[0,3,4],[1,2,5]]);
B
:=
[ 0
3
4 ]
[ 1
2
5 ]
> C:=evalm(A+B);
C
:=
[ 1
5
7 ]
[ 3
6
10 ]
> D:=evalm(3*A);
D
:=
[ 3
6
9 ]
[ 6
12
15 ]
> T:=evalm(2*A+3*B+4*C);
T
:=
[ 6
33
46 ]
[ 19
38
65 ]