next up previous contents index
suivant: Multiplication of two matrices monter: Arithmetic and matrix précédent: Evaluate a matrix :   Table des matières   Index


Addition and substraction of two matrices : + - .+ .-

The infixed operator + or .+ (resp - or .-) are used for the addition (resp substraction) of two matrices.
Input :
[[1,2],[3,4]] + [[5,6],[7,8]]
Output :
[[6,8],[10,12]]
Input :
[[1,2],[3,4]] - [[5,6],[7,8]]
Output :
[[-4,-4],[-4,-4]]
Remark
+ can be used as a prefixed operator, in that case + must be quoted ('+').
Input :
'+'([[1,2],[3,4]],[[5,6],[7,8]],[[2,2],[3,3]])
Output :
[[8,10],[13,15]]



giac documentation written by Renée De Graeve and Bernard Parisse