( 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:
1.34 + -9.06 + means addition of real numbers ( 84.02, 90.31 )T + ( -14.23, 10.85 )T + means addition of 2D column matrices
The following have no meaning:
34.5 + ( 84.02, 90.31 )T can't add a number to a matrix ( 84.02, 90.31 ) + ( -14.23, 10.85 )T can't add a row matrix to a column matrix ( 84.02, 90.31 ) + ( -14.23, 10.85, 32.75 ) can't add matrices of different dimensions
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 are of the same type
There are some strange-looking things you can do, such as in the following: