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. 40
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. 586