Any two-dimensional vector in cartesian (x,y) coordinates can be broken down into individual horizontal and vertical components using trigonometry. If a train goes up a hill with 15 degree incline at a speed of 22 m/s, the horizontal component is 22cos(15)=21.3 m/s and the vertical component is 22sin(15)=5.5 m/s.