Relative Motion of Two Trains Crossing Each Other
Problem
Two trains are moving in opposite directions: Train A: 60 km/h, length 100 m Train B: 40 km/h, length 150 m 👉 Question: Time to completely cross each other?
Explanation
We have two trains moving towards each other on parallel tracks.
- Train A speed: 60 km/h, length: 100 m
- Train B speed: 40 km/h, length: 150 m
We want the time taken to completely cross each other. That means the time from the moment their front ends meet until their rear ends completely pass each other.
1. Convert speeds to consistent units
Lengths are in meters, so convert speeds from km/h to m/s:
- Train A speed:
- Train B speed:
2. Relative speed (opposite directions)
When two objects move towards each other, their relative speed is the sum of their speeds:
So:
3. Total distance to be covered while crossing
For the trains to completely cross each other, the front of one must travel past the rear of the other. Effectively, they need to cover the sum of their lengths:
4. Time to completely cross
Use the basic motion formula:
So, the two trains will completely cross each other in about 9 seconds.
How the visualization works
This interactive visualization shows:
- Two colored rectangles representing the trains on a track, moving towards each other.
- Their speeds, lengths, and whether they move in opposite or same directions are adjustable.
- A computed crossing time is shown on screen using the formula:
where:
- Speeds are converted from km/h to m/s inside the visualization.
- for opposite directions (adds speeds) and for same direction (takes the difference).
A time slider lets you scrub the motion to see how the trains overlap until they have completely passed each other. The neon colors follow:
- Train A: cyan
- Train B: pink
- Track and helper text: yellow
You can also reset to the given problem to see visually why the answer is about 9 seconds.