Updated the answer with counter examples and how physicists define vector spaces.
Loosely, mathematicians consider a vector space to be a set of things that can be added together and multiplied by a number, and behave as you would expect under addition and multiplication. That is the associative law applies, the distributive law applies. Etc. There are $8$ total rules. The first three make the vector space a group under addition.
The set of little arrows is one of the common examples. Addition is tip to tail, or equivalently the parallelogram law. Multiplication by a number is stretching. These have an obvious magnitude and direction.
The set of ordered pair or triplets or ... is the other common example. The pair up nicely with little arrows, and from the little arrows they get a magnitude and direction.
But not all vector spaces are like this. Anything that behaves well under addition and multiplication is be a vector space. For example the set of all polynomials $ax^2 + bx + c$ is a vector space.
It is possible to define a magnitude or norm on a vector space. But this is an additional set of rules.
The three rules are
- Every vector $\vec X$ must have a magnitude $|\vec X| \ge 0$
- The only vector with magnitude $0$ is the vector $\vec 0$
- The triangle inequality $|\vec X + \vec Y| \le |\vec X| + |\vec Y|$
You don't have to define a norm, and you can define them in different ways.
The common norm on the space of ordered triplets is
$$|(x,y,z)| = (x^2 + y^2 + z^2)^{1/2}$$
Other examples are
$$|(x,y,z)| = (x^n + y^n + z^n)^{1/n}$$
for any non-negative integer $n$.
Consider the set of all lattice points in the plane under addition and multiplication by a number. Lattice points have integer coordinates. It satisfies the parallelogram law, and almost all the other rules for a normed vector space.
But multiplication by a scalar fails. $(1,2)$ is a vector.
$\frac{1}{2} \space (1,2)$ is not a lattice point, and therefore not a vector.
Mathematicians have to be very concerned about nitpicks like this. Mathematics starts with axioms and generates true statements by applying logical rules to them. If any false statement is proven true, it can be used to prove other false statements, and the entire structure of math collapses.
Physicists are concerned with describing the behavior of the universe. They can be more sloppy. Sometimes they use approximations. Sometimes the exact math is too difficult to do, or maybe an approximation is just easier and good enough.
Physicists have an additional requirement for a vector space. Vectors must be invariant under coordinate transformations.
In physics, vectors represent physically meaningful quantities. This meaning is independent of the vector space mathematics used to describe it. You must be able to change the description and get the same meaning.
For example, a store is a mile from my house. With the usual coordinate system, it is a mile north. But nothing stops me from defining rotated coordinates where the store is a mile east. I can use either coordinate system to do physics. This is a silly example, but coordinate transformations turn out to be a tremendously useful tool.
A consequence of this rule is that all directions in a vector space must be the same kind of quantity. If one direction is distance, all directions must be distance. You can't have one direction be distance and another be momentum.
In a thermodynamic phase space, half the directions are distance and half momentum. A mathematician would consider it a perfectly good vector space. But a physicist does not.
Physicists define the state of a system as a point in a phase space. As the system evolves, they trace the trajectory of the point. But they don't do vector space things like add points together or multiply a point by a number.
More information:
What is an example of three numbers that do not make up a vector?
Why is force a vector?
From 3blue1brown - Linear Algebra