Sometimes you need to find the point that divides the segment connecting two points A and B in an m:n ratio — this comes up often when finding a specific location between two places on a map or working with geometric figures using coordinates. Change the two points and the ratio with the sliders and see how the internal division point is calculated as a "weighted average" of the two coordinates.
Why does this formula work? If point P divides the segment from A toward B in the ratio m:n, then the ratio of the distance from A to P to the distance from P to B is m:n. In other words, P is shifted "closer to B (as m gets larger)" than to A, and its coordinates are the weighted average of the two points' coordinates using the ratio m:n.
When m=n, P is exactly halfway between the two points, so it is the midpoint. When m is larger than n, P shifts closer to B; when n is larger than m, P shifts closer to A — remembering that "the point is pulled toward the side opposite the larger weight" can help you avoid confusion.