conservation of momentum
Conservation of momentum

The law of conservation of momentum states that in a closed system, the total momentum remains constant. If the initial velocities of particles are \[\vec{u}_{A}\] and \[\vec{u}_{B}\] then: \[m_{A}\vec{u}_{A}+m_{B}\vec{u}_{B}=m_{A}\vec{v}_{A}+m_{B}\vec{v}_{B}\], or \[\vec{p}_{\text{initial}}=\vec{p}_{\text{final}}\]. It is important to understand that this is a vector equation; it tells us that the total component of the momentum is conserved in every component (e.g. \[x\], \[y\], \[z\]).
Even if the momenta of individual parts of a system are not conserved, the momentum of the entire system is always conserved, as long as no net external force acts on the system.
Newton's third law
We're going to show why the conservation of momentum is a consequence of Newton's third law.
Assume we have two carts labeled \[A\] and \[B\] colliding with each other. The upwards normal force applied by the floor on each cart is balanced by the downwards force of gravity, so the net force experienced by each cart during the collision is that applied by the other cart.
The collision changes the momentum of cart \[A\] from \[\vec{p}_{A\,\text{initial}}\] to \[\vec{p}_{A\,\text{final}}=\vec{p}_{A\,\text{initial}}+\Delta \vec{p}_{A}\]. Similarly, for cart \[B\], it's changes in momentum is given by \[\vec{p}_{B\,\text{initial}}\] to \[\vec{p}_{B\,\text{final}}=\vec{p}_{B\,\text{initial}}+\Delta \vec{p}_{B}\].
Then the total momentum of the system after the collision is \[\vec{p}_{A\,\text{final}}+\vec{p}_{B\,\text{final}}=\vec{p}_{A\,\text{initial}}+\Delta \vec{p}_{A}+\vec{p}_{B\,\text{initial}}+\Delta \vec{p}_{B}\].
Consider \[\Delta \vec{p}_{A}\] to be the change in momentum experienced by cart \[A\] in the collision. This change in momentum comes form the force applied to cart \[A\] by cart \[B\] during the collision. Similarly, \[\Delta \vec{p}_{B}\], comes from the force applied to cart \[B\] by cart \[A\] during the collision. Newton's third law tells us that the force applied to cart \[A\] by cart \[B\] is equal and opposite to that applied to cart \[B\] by cart \[A\], or mathematically \[\vec{F}_{A}=-\vec{F}_{B}\].
If we substitute the equation above into \[\Delta \vec{p}_{A}=\vec{F}_{A}\Delta t\] and \[\Delta \vec{p}_{B}=\vec{F}_{B}\Delta t\], we get \[\Delta \vec{p}_{B}=-\Delta \vec{p}_{A}\]. Then substitute that into the equation of total momentum of the system after collision and we get \[\vec{p}_{A\,\text{final}}+\vec{p}_{B\,\text{final}}=\vec{p}_{A\,\text{initial}}+\vec{p}_{B\,\text{initial}}\].
Example
If the collision has an angle such as this:

\[m_{A}u_{A}+m_{B}u_{B}=m_{A}v_{A}\cos\phi+m_{B}v_{B}\cos\phi\] (horizontal component) and, \[0=m_{A}v_{A}\sin\phi+m_{B}v_{B}\sin\phi\] (vertical component).