Chapter 6 Vector Basics

Because variables can be treated as vectors in a geometric sense, I would like to briefly revisit a couple of key concepts for operating with vectors: the inner product and derived operations.

We’ll keep using the toy \(2 \times 2\) data matrix of weight and height discussed in the previous chapter. Here’s the code in R for such matrix:

# data matrix
X <- matrix(c(150, 172, 180, 49, 77, 80), nrow = 3, ncol = 2)
rownames(X) <- c("Leia", "Luke", "Han")
colnames(X) <- c("weight", "height")

X
     weight height
Leia    150     49
Luke    172     77
Han     180     80