Mathwords logoMathwords

R^n — Definition, Formula & Examples

Rn\mathbb{R}^n is the space of all lists of nn real numbers, such as (x1,x2,…,xn)(x_1, x_2, \dots, x_n). For example, R2\mathbb{R}^2 is the coordinate plane and R3\mathbb{R}^3 is ordinary three-dimensional space.

For a positive integer nn, Rn=R×⋯×R\mathbb{R}^n = \mathbb{R} \times \cdots \times \mathbb{R} (nn factors) is the set of ordered nn-tuples x=(x1,…,xn)\mathbf{x} = (x_1, \dots, x_n) with each xi∈Rx_i \in \mathbb{R}. With componentwise addition x+y=(x1+y1,…,xn+yn)\mathbf{x} + \mathbf{y} = (x_1 + y_1, \dots, x_n + y_n) and scalar multiplication cx=(cx1,…,cxn)c\mathbf{x} = (cx_1, \dots, cx_n), it is a real vector space of dimension nn. Equipped with the inner product x⋅y=∑i=1nxiyi\mathbf{x} \cdot \mathbf{y} = \sum_{i=1}^n x_i y_i, it is called nn-dimensional Euclidean space. The inner product induces the norm ∥x∥=x⋅x\|\mathbf{x}\| = \sqrt{\mathbf{x} \cdot \mathbf{x}} and the metric d(x,y)=∥x−y∥d(\mathbf{x}, \mathbf{y}) = \|\mathbf{x} - \mathbf{y}\|.

Key Formula

d(x,y)=∥x−y∥=∑i=1n(xi−yi)2d(\mathbf{x}, \mathbf{y}) = \|\mathbf{x} - \mathbf{y}\| = \sqrt{\sum_{i=1}^{n} (x_i - y_i)^2}
Where:
  • x,y\mathbf{x}, \mathbf{y} = Points (vectors) in Rn\mathbb{R}^n
  • xi,yix_i, y_i = The ii-th coordinates of x\mathbf{x} and y\mathbf{y}
  • nn = The dimension, which is the number of coordinates in each point
  • d(x,y)d(\mathbf{x}, \mathbf{y}) = The Euclidean distance between the two points

Worked Example

Problem: Find the Euclidean distance between the points x=(1,2,3)\mathbf{x} = (1, 2, 3) and y=(4,6,15)\mathbf{y} = (4, 6, 15) in R3\mathbb{R}^3.
Step 1: Subtract the points coordinate by coordinate. This uses the vector operations of R3\mathbb{R}^3.
y−x=(4−1, 6−2, 15−3)=(3,4,12)\mathbf{y} - \mathbf{x} = (4-1,\ 6-2,\ 15-3) = (3, 4, 12)
Step 2: Square each component and add the results.
32+42+122=9+16+144=1693^2 + 4^2 + 12^2 = 9 + 16 + 144 = 169
Step 3: Take the square root to get the norm of the difference vector.
d(x,y)=169=13d(\mathbf{x}, \mathbf{y}) = \sqrt{169} = 13
Answer: The distance between the two points is 1313.

Why It Matters

Rn\mathbb{R}^n is the setting for multivariable calculus and linear algebra. In real analysis, you study open sets, convergence, and compactness there, including the Heine–Borel theorem: a subset of Rn\mathbb{R}^n is compact exactly when it is closed and bounded. In data science, each data point with nn numeric features is a vector in Rn\mathbb{R}^n.

Common Mistakes

Mistake: Reading Rn\mathbb{R}^n as a power of a number, or thinking that dimensions above 3 have no meaning.
Correction: The exponent counts how many copies of R\mathbb{R} appear in a Cartesian product, so it means 'lists of length nn.' You cannot picture R5\mathbb{R}^5, but you can still add its vectors, measure distances in it, and take limits there using the same formulas.

Related Terms