# Sorting a list by increasing order: SortA

### 5.40.19 Sorting a list by increasing order: SortA

The SortA command sorts a list or a matrix in increasing order.

- SortA takes one argument:
  L, a list.
- If L is not a matrix:
  SortA(L) returns a copy of L with the elements in increasing order (if L is not a matrix).
  If L is a matrix:
  SortA(L) returns a copy of L where the columns are sorted according to increasing order in the first row.

#### Examples.

- Input:
  SortA([3,4,2])
  Output:

  ⎡ ⎣ | 2,3,4 | ⎤ ⎦

- Input:
  SortA([[3,4,2],[6,4,5]])
  Output:

  ⎡
  ⎢
  ⎣

  2 | 3 | 4
  5 | 6 | 4

  ⎤
  ⎥
  ⎦