apply() functions

Matrix: like a vector, but arranged as rows and columns.

x <- matrix(1:24, ncol = 3)
x
##      [,1] [,2] [,3]
## [1,]    1    9   17
## [2,]    2   10   18
## [3,]    3   11   19
## [4,]    4   12   20
## [5,]    5   13   21
## [6,]    6   14   22
## [7,]    7   15   23
## [8,]    8   16   24