6.45.4 Addition of elements of a column of a matrix: sum
The sum command (see also Section 6.20.3) can add the
elements of the columns of a matrix.
-
sum takes one argument:
A, a matrix.
- sum(A) returns the list whose elements are the sum
of the elements of each column of the matrix A.
Example.
Input:
sum([[1,2],[3,4]])
Output: