ch-3.1-exam-new-박종우

1919 days ago by matrix

A=matrix(QQ,[[5,8,1,2,5], [-2,5,-6,7,5]]) B=matrix(QQ,[[-4,-8,0,-2,-4], [2,-4,6,-6,-5]]) C=matrix(QQ,[[3,4,-2],[1,-3,2],[3,2,2]]) print "A+B" print A+B print "2A" print 2*A print "-C" print (-1)*C 
       
A+B
[1 0 1 0 1]
[0 1 0 1 0]
2A
[ 10  16   2   4  10]
[ -4  10 -12  14  10]
-C
[-3 -4  2]
[-1  3 -2]
[-3 -2 -2]
A+B
[1 0 1 0 1]
[0 1 0 1 0]
2A
[ 10  16   2   4  10]
[ -4  10 -12  14  10]
-C
[-3 -4  2]
[-1  3 -2]
[-3 -2 -2]