Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Matrix operations associativity?
Replies: 3   Last Post: Nov 11, 2013 6:00 PM

 Messages: [ Previous | Next ]
 Clara Posts: 1 Registered: 11/11/13
Matrix operations associativity?
Posted: Nov 11, 2013 4:22 PM

Hello,

I am currently banging my head on the following problem: I want to split a matrix A in two components A+ and A-.

I define A- as A- = A - A+ and obtain the following disturbing result:

Aminus = A-Aplus;
nnz(Aplus-A+Aminus)
ans = 0

nnz(Aminus-A+Aplus)
ans = 1257

Thinking that it may arise from some parenthesation issue, I tried the following.

nnz((Aminus-A)+Aplus)
ans = 1257

nnz((Aminus-(A-Aplus)))
ans = 0

Could someone please explain me what's going on?

Thanks a lot!

Date Subject Author
11/11/13 Clara
11/11/13 Nasser Abbasi
11/11/13 Steven Lord
11/11/13 John D'Errico