Vectors in ℝⁿ
About this app
Vectors beyond arrows: monthly sales as a vector in ℝ¹², position + velocity as a state in ℝ⁶. a + b, r·a and a·b component-wise, the dot product as a running sum, magnitude and cos φ as the similarity of two curves (b = 2·a ⇒ cos φ = 1), time step position + Δt·v in 3D.
With explain mode: an AI tutor walks you through the app, points out what matters in the scene and answers your questions.
The idea
A vector in ℝⁿ is an ordered n-tuple of real numbers. Twelve monthly sales figures form a vector in ℝ¹²; three position coordinates and three velocity components form a state in ℝ⁶. You can no longer draw these as arrows, but the arithmetic works as in ℝ²: component by component. The dot product is a · b = a₁b₁ + … + aₙbₙ and the length is |a| = √(a · a). Through cos φ = a · b / (|a| · |b|), an angle makes sense even in ℝ¹², as a measure of how similar two series are.
What you see
In the Sales ℝ¹² space, the monthly sales of two branches appear as bars or a line chart. For a + b, r · a and a · b, a card shows the calculation month by month, with a running sum for the dot product. Another card draws a and b as arrows in the plane they span, with the angle φ. You can subtract the mean, in which case cos φ̃ is the Pearson correlation coefficient. In the Motion ℝ⁶ space a 3D scene shows position and velocity, and the time step computes position + Δt · v.
Things to try
Drag individual monthly values up or down and watch cos φ. The example b = 2 · a shows that the length doubles while cos φ stays exactly 1, because “direction” here means the shape of the series. “Half-years” gives a · b = 0, so the vectors are perpendicular in ℝ¹². In “Opposite seasons” (an ice-cream shop and a ski rental) cos φ only turns negative once the mean is subtracted. In ℝ⁶, “Escalator” shows how states add up. In explain mode, the AI tutor walks you through the app live.
Frequently asked questions
- What is a vector in ℝⁿ?
- A vector in ℝⁿ is an ordered list of n real numbers (a₁, …, aₙ). For n = 2 or 3 you can draw it as an arrow; for larger n you cannot, but addition, scalar multiples, the dot product and length still work component by component. Two vectors are only equal if they live in the same ℝⁿ and all components match.
- How do you compute the dot product of two vectors?
- Multiply the components pairwise and add the products: a · b = a₁b₁ + a₂b₂ + … + aₙbₙ. If the result is 0 and neither vector is the zero vector, the vectors are perpendicular. Together with the lengths, the angle follows from cos φ = a · b / (|a| · |b|).
- How is the cosine between two vectors related to correlation?
- cos φ measures how similar the directions of two vectors are, regardless of their length, on a scale from −1 to 1. If you first subtract each vector’s mean from its components, the cosine is exactly the Pearson correlation coefficient. Without this centring, vectors with only positive entries always come out positively similar.
- What does the Vectors in ℝⁿ app show?
- It works with vectors of twelve monthly sales figures and with motion states made of position and velocity. You change values by dragging, see sums, multiples and the dot product component by component, and compare series via cos φ; in ℝ⁶ a 3D scene shows the time step.
Subject: Linear algebra
More from Linear algebra
- Eigenvectors
- Gaussian elimination step by step
- Equations as scales
- Linear combination & linear independence (3D)
- Matrix × vector
- Matrizen rechnen: Produkt, Inverse, Transponierte
- Matrices like numbers: identity, inverse, A·x = b
- Matrix multiplication
A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps