# Given two vectors (with no common point), is a dot product between them possible?

Vector by definition only has *magnitude* and *direction*. Origin is not part of the vector. In particular, you can unambiguously define a vector between two points $A$ and $B$ by finding the distance between these points and direction from one to another.

Dot product is defined in terms of the two properties of vectors — magnitude and direction. In particular, it's equal to product of magnitudes and cosine of the angle between the directions of the vectors. Notice how there's no reference to any origin in this definition.

Now, of course there are situations where we assign vectors to some points in space. And of course, in some cases it may be meaningless to calculate dot products between the vectors assigned to different points. But this all depends on the exact problem context, there's no universal rule for this.

There are different ways to answer this question, but a natural one for the purposes of physics is with differential geometry. Some background:

(1) Every **vector** lives in some **vector space**. A vector space is a collection of vectors which obey particular axioms. Adding two vectors produces another vector, you can multiply the vectors by scalars (numbers), etc. These should be relatively familiar to any undergrad in physics even if you haven't had any formal training in linear algebra. In particular, every vector space contains a **zero vector**, which defines a unique "origin".

(2) The dot product of two vectors is an example of an **inner product**. An inner product is any map which assigns to every pair of vectors in a vector space a scalar, $\left<\mathbf{a},\mathbf{b}\right> = c$.

(3) A **manifold**, at its most basic, is a set of points and some set of **coordinate functions** which assign to every point a coordinate. In your example picture, you have drawn a Cartesian coordinate system on the *manifold* $\mathbb{R}^2$, 2-dimensional Euclidean space, which assigns to each point in the manifold the coordinate $(x,y)$. Note that a manifold is not necessarily a vector space, and in general does not have an origin. In that sense, a manifold is somewhat more akin to an **affine space**. The points in a manifold are not vectors! You cannot add them or multiply them by scalars.

(4) A (real) **function** on a manifold is a map that assigns a real number to every point in some region (*subset*) of the manifold. As an example, consider the one dimensional manifold $\mathbb{R}^1$, the real line, with natural coordinate $x$ assigning to each point the corresponding real number. A function $f(x)$ such as $f(x) = \sin(x)$ or $f(x) = \tan(x)$ assigns to each point in some subset of the manifold a real number. Note that in the second case, the function is not defined everywhere. Note these functions are differentiable everywhere they are defined.

(5) Consider a point $p$ in a manifold. Consider some sequence of points $\gamma(s)$ (a *curve*) passing through $p$, parameterized by some real number $s$. That is, for each $s$, say $s\in(-1,1)$, $\gamma(s)$ is a point on the curve. Let's say that $\gamma(0) = p$. One can then define the **tangent vector** to $\gamma$ at $p$, $\mathbf{v}_p$, as the **directional derivative** of functions along the curve $\gamma$ at $p$, that is
$$\mathbf{v}_p(f) \equiv \left.\frac{\partial f(\gamma(s))}{\partial s}\right|_{s=0}$$
The important lesson of this definition is that **vectors do not live on the manifold**, instead, they live in **tangent vector spaces** which are defined at every point $p$ in the manifold. As an example, consider the surface of a sphere, $S^2$, which is a non-trivial two-dimensional manifold. If you imagine the sphere embedded in $\mathbb{R}^3$, you see that the tangent vectors do not lie on the sphere at all! At each point on the sphere, there is a **tangent vector space** which is a plane tangent to the sphere.

Thus vectors naturally live in the tangent spaces at each point. In the image you drew, the two vectors live in *different* tangent spaces. In general, there is no apriori way at this simple level of defining how one should go about comparing vectors in different tangent spaces. One could define one in terms of coordinates, but it will depend on the coordinates we use.

Okay, so all of that is the background. I won't go into any more detail, but the lesson is that **in general, tangent vectors in different tangent spaces cannot be compared**. In order to compare them, one must define a **connection**, a mathematical object which tells us how to *connect* different tangent spaces in a way that is independent of coordinates. However, as long as we restrict ourselves to flat space, such as the manifold $\mathbb{R}^2$ which you are considering, we actually secretly already have a natural connection, the flat connection. Effectively, this connection tells us we can just take any two vectors we like (expressed in the same cartesian coordinate system) and freely take their inner product (the dot product).

Another way of saying this is that the **metric** is flat. The metric, as its name implies, tells us how we are to "measure" vectors. More specifically, it defines a unique inner product in each tangent space in a way that smoothly varies as we move through the manifold. It also tells us how to **parallel transport** vectors between tangent spaces so that they can be compared. Parallel transport on a flat manifold does nothing to the components of the vectors, they simply remain the same throughout the transport process. This is why we can take any two vectors and take their dot product in $\mathbb{R}^n$. This is not true on curved manifolds such as the sphere $S^2$, as demonstrated in the image below. Parallel transporting a vector around a closed loop back to its original tangent space actually changes the vector, and this is how we measure curvature! Transporting a vector along any arbitrary curve between two different tangent spaces will in general yield different results. Parallel transport is transport along a **geodesic** of the manifold, a curve of shortest distance. Curves of shortest distance in Euclidean space are straight lines which are always parallel and never cross, and this is effectively why we can freely transport vectors in whatever direction we like without changing their components.

Yes, a dot product is possible between vectors based at different points.

As an example, the Lorentz-invariant mass $m$ of a system of two particles with energies $E_1$ and $E_2$ and momenta $\mathbf{p}_1$ and $\mathbf{p}_2$ is given (in units where $c=1$) by

$$m^2=(E_1+E_2)^2-(\mathbf{p}_1+\mathbf{p}_2)^2$$

which involves the dot product $\mathbf{p}_1\cdot\mathbf{p}_2$ even though the two particles are not at the same point.

You can calculate a dot product using

$$\mathbf{a}\cdot\mathbf{b}=a_xb_x+a_yb_y+a_zb_z$$

regardless of where each vector is based.

A cross product, such as $\mathbf{r}\times\mathbf{p}$ for angular momentum, can similarly involve vectors based at different points.

When the vectors live in a curved space rather than a flat one, things get trickier. In general, you have to then “parallel transport” one vector to the other to have a sensible product between them. But in Euclidean space or Minkowski spacetime, there is no problem because this parallel transport doesn’t change the components.