A vector is an ordered collection of numbers arranged along one axis. Geometrically, it represents a point or a directed arrow from the origin. In neural networks, inputs, targets, and intermediate representations are commonly treated as vectors in geometric spaces. section 2.2.2 section 20.1.3
A five-entry vector
x <- as.array(c(12, 3, 6, 14, 7)) str(x) # num [1:5(1d)] 12 3 6 14 7 dim(x) # [1] 5 This is a five-dimensional vector because it has five entries on one axis. It is not a five-dimensional tensor: that phrase refers to five axes, whereas this vector has rank 1. section 2.2.2
Vector addition has a geometric interpretation. Adding B to A moves the point represented by A by B’s distance and direction; applying the same addition to many points translates the entire object without distorting it. Matrix products similarly express rotation, scaling, and other linear transformations. section 2.3.5
Keep these tensor distinctions clear:
- A vector, rank-1 tensor, or 1D tensor has exactly one axis. section 2.2.2
- A vector’s dimensionality can mean the number of entries along its single axis; tensor rank means the number of axes. section 2.2.2
- A scalar has no axes, while an R length-one numeric vector is conceptually similar to a scalar. section 2.2.1
- Dense layers combine matrix multiplication, vector addition, and ReLU to transform tensor representations. section 2.3
x <- as.array(c(12, 3, 6, 14, 7)) str(x) num [1:5(1d)] 12 3 6 14 7 dim(x) [1] 5
Inspect the R vector’s contents and dimensions directly. section 2.2.2










