Let's start by defining momentum. Momentum (p) is defined as the product of an object's mass (m) and its velocity (v):
p = m x v
The total momentum of a system of objects is simply the sum of the momenta of all the objects in the system:

Now, let's consider two objects in a system, labeled 1 and 2. If there are no external forces acting on the system, the total momentum of the system remains constant:

where p1_i and p2_i are the initial momenta of objects 1 and 2, respectively, and p1_f and p2_f are the final momenta of objects 1 and 2, respectively.
If we express the momenta in terms of mass and velocity, we get:
m1v1_i + m2v2_i = m1v1_f + m2v2_f
This is the mathematical formula of conservation of momentum. It states that the sum of the products of mass and velocity before a collision is equal to the sum of the products of mass and velocity after a collision, provided that no external forces act on the system.