( 25.1, -19.6 ) + ( -5.0, 9.0 ) + ( 12.4, 8.92 ) + ( -20.1, 10.6 ) = ------------- --------------- \ / \ / \ / \ / ( 25.1, -19.6 ) + ( 12.4, 8.92 ) + ( -25.1, 19.6 ) --------------- --------------- \ / \ / \ / \ / \ / ( 0.0, 0.0 ) + ( 12.4, 8.92 ) = ( 12.4, 8.92 )
In computer science terms, the "+" symbol is overloaded, which means that the operation called for depends on the type of operands. For example:
+ means addition of real numbers: 1.34 + -9.06 + means addition of column matrices: ( 84.02, 90.31 )T + ( -14.23, 10.85 )T
The following have no meaning:
can't add a number to a matrix: 34.5 + ( 84.02, 90.31 )T can't add a row matrix to a column matrix: ( 84.02, 90.31 ) + ( -14.23, 10.85 )T can't add matrices of different dimensions: ( 84.02, 90.31 ) + ( -14.23, 10.85, 32.75 )
These problems are clear when the elements are written out, as above, but it is less clear when variable symbols are used:
a + x ← can't add a number to a matrix x + y ← make sure that both operands are the same type
Perform the following addition:
( 4.5, x1, w ) + ( -2.3, 3, y2 ) =