The cumSum() Command

Command Summary

Calculates cumulative sums of a list or of the columns of a matrix.

Command Syntax

cumSum(list or matrix)

Menu Location


  1. 2nd [MATH] to access the math menu.
  2. 3 to access the list submenu, or use arrows.
  3. 7 to select cumSum(), or use arrows.

Alternatively, type cumSum( with the keyboard.

Calculator Compatibility


Token Size

7 bytes

cumSum( calculates the cumulative sums of a list, or of the columns of a matrix, and outputs them in a new list or matrix variable.

For a list, this means that the Nth element of the result is the sum of the first N elements of the list, and the N-1th element of the result is the sum of the first N-1 elements, and so on:

    {1 4 9 16 25}

For a matrix, cumSum( is applied to each column in the same way as it would be for a list (but numbers in different columns are never added):

    [[0 1 1]
     [0 2 4]
     [0 3 9]
     [0 4 16]]

Advanced Uses

For a matrix, if you want to sum up the rows instead of the columns, use the T (transpose) command.

    [[0 1 2]
     [0 1 4]
     [0 1 6]
     [0 1 8]]

Related Commands

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 License.