Question: The sum of two matrixes

Dear all,

im having trouble with adding two matrixes when they are only described with a letter asigned to them. I really dont know why it is the case. But it has got the be done with letters only because later on i will need this a lot with vector calculations etc. 

Thank you!

A := matrix([[2, -5, 1], [0, 3, -2]]); B := matrix([[0, 2, -1], [7, 1, 3]]); matrix(A+B)

A := Matrix(2, 3, {(1, 1) = 2, (1, 2) = -5, (1, 3) = 1, (2, 1) = 0, (2, 2) = 3, (2, 3) = -2})

 

array( 1 .. 2, 1 .. 3, [( 1, 2 ) = (2), ( 2, 2 ) = (1), ( 2, 3 ) = (3), ( 1, 1 ) = (0), ( 2, 1 ) = (7), ( 1, 3 ) = (-1)  ] )

 

Error, (in matrix) invalid argument A+B

 

help("matrix")

(Matrix(2, 3, {(1, 1) = 2, (1, 2) = -5, (1, 3) = 1, (2, 1) = 0, (2, 2) = 3, (2, 3) = -2}))+(Matrix(2, 3, {(1, 1) = 0, (1, 2) = 2, (1, 3) = -1, (2, 1) = 7, (2, 2) = 1, (2, 3) = 3}))

Matrix(%id = 18446746769648450246)

(1)

A+B

A+B

(2)

evalc(%)

A+B

(3)

evalf(%)

A+B

(4)

``


Greetings,

The Function

Download Mapleprimes_Question_Book_2_Paragraph_4.1.mw

Please Wait...