You can give a matrix a name with assignment.
Input:
The rows are then accessed with indices.
Input:
Output:
Individual elements are simply elements of the rows.
Input:
Output:
This can be abbreviated by listing the row and column separated by a
comma.
Input:
Output:
The indexing begins with 0; if you want the indexing to begin with 1
by enclosing them in double brackets.
Input:
Output:
You can use a range of indices to get submatrices.
Input:
Output:
Input:
Output:
Input:
Output:
An index of -1 returns the last element of a list, an index of -2 the
second to last element, etc.
Input:
Output:
Input:
Output:
Individual elements of a matrix can be changed by assignment.
Input:
then:
Output: