Sub topic 5
Splitting the launch velocity into components
This chapter covers how to turn a launch speed and angle into horizontal and vertical velocity components. It assumes you know right-triangle trigonometry (sine, cosine, tangent), basic algebra, and one-dimensional motion with constant acceleration. The earlier chapters on the ideal model and on independent axes explain why this split is useful. Here we focus on doing it correctly.
Why the split comes first
A projectile leaves the launcher with one velocity vector. That vector has a magnitude (the launch speed, written v₀) and a direction (the launch angle, written θ). The ideal model treats the horizontal and vertical motions separately, and each of those needs its own starting velocity. So every projectile problem starts by converting (v₀, θ) into two numbers: v₀ₓ and v₀ᵧ.
The conversion uses a right triangle. The launch velocity is the hypotenuse. The horizontal component is the side next to the angle. The vertical component is the side opposite the angle.
The two formulas
For a launch angle θ measured from the horizontal:
- v₀ₓ = v₀ cos θ
- v₀ᵧ = v₀ sin θ
Going the other way, you can recover the speed and angle from the components:
- v₀ = √(v₀ₓ² + v₀ᵧ²)
- θ = arctan(v₀ᵧ / v₀ₓ)
A quick check on the formulas: at θ = 0 the projectile is launched horizontally, so cos 0 = 1 gives v₀ₓ = v₀ and sin 0 = 0 gives v₀ᵧ = 0. At θ = 90° the projectile goes straight up, so v₀ₓ = 0 and v₀ᵧ = v₀. If your results do not match these two limits, the formulas are swapped.
Sign conventions
Choose axes before you compute anything. A common choice is x to the right and y upward, with the origin at the launch point. With this choice:
- A launch upward has positive v₀ᵧ, which means θ is positive.
- A launch below the horizontal (for example, a ball thrown downward off a roof) has a negative angle, so v₀ᵧ is negative.
- Gravity gives a vertical acceleration aᵧ = −g, with g = 9.81 m/s².
The sign of each component carries the direction. Do not drop signs and then try to fix them later in the problem.
Worked example
A ball is kicked at 20.0 m/s at 30° above the horizontal.
- Horizontal component: v₀ₓ = 20.0 cos 30° = 20.0 × 0.8660 = 17.32 m/s.
- Vertical component: v₀ᵧ = 20.0 sin 30° = 20.0 × 0.5000 = 10.00 m/s.
- Check: √(17.32² + 10.00²) = √(300.0 + 100.0) = √400.0 = 20.0 m/s. This matches the launch speed.
The check in step 3 is worth doing every time. It catches a swapped sine and cosine, and it catches a calculator set to the wrong angle mode.
The first code example in the topic does exactly this split before computing flight time, maximum height, and range. Here is the split on its own, with the check included:
import math
v0 = 20.0 # launch speed, m/s
angle_deg = 30.0 # launch angle above the horizontal
theta = math.radians(angle_deg) # math.sin and math.cos expect radians
vx = v0 * math.cos(theta)
vy = v0 * math.sin(theta)
print(f"vx = {vx:.2f} m/s, vy = {vy:.2f} m/s")
# Consistency checks
speed = math.hypot(vx, vy)
angle_back = math.degrees(math.atan2(vy, vx))
print(f"speed = {speed:.2f} m/s, angle = {angle_back:.1f} deg")The output is vx = 17.32 m/s, vy = 10.00 m/s and then speed = 20.00 m/s, angle = 30.0 deg.
Angles measured from other references
Problems do not always give the angle from the horizontal. The rule is that the cosine goes with the angle measured from the axis you are projecting onto.
| How the angle is given | v₀ₓ | v₀ᵧ |
|---|---|---|
| θ above the horizontal | v₀ cos θ | v₀ sin θ |
| θ below the horizontal | v₀ cos θ | −v₀ sin θ |
| α measured from the vertical | v₀ sin α | v₀ cos α |
| Slope given as rise over run (rise = a, run = b) | v₀ b / √(a² + b²) | v₀ a / √(a² + b²) |
If an angle is measured from the vertical, convert it with θ = 90° − α, or use the table row directly. Both give the same numbers because sin(90° − θ) = cos θ.
The slope row is useful when a problem says something like "launched along the direction of 3 up for every 4 across." No trigonometry is needed there. The hypotenuse is √(3² + 4²) = 5, so v₀ₓ = 0.8 v₀ and v₀ᵧ = 0.6 v₀.
Launch from a moving platform
Sometimes the launcher is itself moving, for example a ball thrown from a train or a moving cart. In the ground frame, the ball's initial velocity is the vector sum of the launcher's velocity and the throw velocity relative to the launcher.
If a cart moves at u = 3.0 m/s in the +x direction and a ball is thrown from it at 10.0 m/s and 60° relative to the cart, then in the ground frame:
- v₀ₓ = u + 10.0 cos 60° = 3.0 + 5.0 = 8.0 m/s
- v₀ᵧ = 10.0 sin 60° = 8.66 m/s
Add components, not magnitudes. Adding 3.0 and 10.0 to get 13.0 m/s would be wrong because the two velocities point in different directions.
Common errors
- Calculator or library in the wrong angle mode. Python's
math.sinandmath.costake radians. Passing 30 directly gives the sine of 30 radians, which is −0.99. Convert withmath.radiansfirst. - Swapping sine and cosine. This happens most often when the angle is given from the vertical. Use the limit checks at θ = 0° and θ = 90°.
- Treating v₀ as a component. The launch speed is the magnitude of the velocity vector. It is not the horizontal speed unless θ = 0.
- Dropping the sign. A downward launch needs a negative v₀ᵧ. If the sign is lost, the projectile will seem to rise.
- Rounding too early. Keep at least four significant figures in the components until the final answer, since later steps square and multiply them.
- Using
atanfor the angle back.math.atan(vy / vx)loses the quadrant and fails when vx = 0.math.atan2(vy, vx)handles both.
What carries forward
After this step, v₀ₓ and v₀ᵧ are the only launch information the rest of the analysis needs. The horizontal equation uses v₀ₓ as a constant velocity. The vertical equations use v₀ᵧ as the starting velocity under the constant acceleration −g. The next chapter writes those position and velocity equations for each axis.
Exercise
A stone is thrown from the top of a hill at 12.0 m/s at 25° below the horizontal. Take x to the right and y upward. Find v₀ₓ and v₀ᵧ, and check that they reproduce the launch speed.
Show answer
Because the angle is below the horizontal, v₀ᵧ is negative. v₀ₓ = 12.0 cos 25° = 12.0 × 0.9063 = 10.88 m/s. v₀ᵧ = −12.0 sin 25° = −12.0 × 0.4226 = −5.07 m/s. Check: √(10.88² + 5.07²) = √(118.4 + 25.7) = √144.1 = 12.0 m/s, which matches.
Exercise
A projectile is launched at 30.0 m/s at an angle of 20° measured from the vertical, pointing to the right. Find v₀ₓ and v₀ᵧ, and state the angle above the horizontal.
Show answer
With the angle measured from the vertical, v₀ₓ = 30.0 sin 20° = 30.0 × 0.3420 = 10.26 m/s and v₀ᵧ = 30.0 cos 20° = 30.0 × 0.9397 = 28.19 m/s. The angle above the horizontal is 90° − 20° = 70°. Check: 30.0 cos 70° = 10.26 m/s and 30.0 sin 70° = 28.19 m/s.
Exercise
A cart rolls at 4.0 m/s in the +x direction. A ball is thrown from it at 8.0 m/s, 45° above the horizontal, in the +x direction relative to the cart. What are the ball's initial velocity components in the ground frame, and what is its ground-frame launch speed?
Show answer
Relative to the cart the throw components are 8.0 cos 45° = 5.66 m/s and 8.0 sin 45° = 5.66 m/s. Adding the cart's velocity to the horizontal part gives v₀ₓ = 4.0 + 5.66 = 9.66 m/s and v₀ᵧ = 5.66 m/s. The ground-frame speed is √(9.66² + 5.66²) = √(93.3 + 32.0) = √125.3 = 11.2 m/s, not 12.0 m/s, because the velocities are added as vectors.