|
|
Distance from a Point to a Line

Suppose there is a line and a point in a Cartesian plane. What can one do to relate the line and the point and define a characteristic that would co-relate them?

Mockup Schule

Explore our app and discover over 50 million learning materials for free.

Distance from a Point to a Line

Illustration

Lerne mit deinen Freunden und bleibe auf dem richtigen Kurs mit deinen persönlichen Lernstatistiken

Jetzt kostenlos anmelden

Nie wieder prokastinieren mit unseren Lernerinnerungen.

Jetzt kostenlos anmelden
Illustration

Suppose there is a line and a point in a Cartesian plane. What can one do to relate the line and the point and define a characteristic that would co-relate them?

One such fundamental way of relating them is the distance between them, and that’s what we shall attempt to find out in this article: the distance from a point to a line.

Distance from a point to a line definition

Let us analyze this problem using the diagram below.

Distance from a point to a line, a line and a point A with some distances on it, StudySmarter

A line l and a point A with some of the possible distances between them, StudySmarter Originals

If one was asked to find the distance between the point A and line l then it would be really ambiguous since there are several, in fact, infinite ways we can connect the point and the line.

Hence, one has to be specific about which distance is asked about. Some of the distances are shown by the green segments in the above diagram.

But the only specific distance that can be named and one can quantify is the shortest distance between the point and the line.

The shortest distance between the line and the point is shown by the pink line segment in the above diagram.

The distance between a point and a line is given by the shortest distance between them.

The shortest line segment is perpendicular to the line itself. Because any other line segment will make an acute or obtuse angle with the line, the shortest distance will only be possible when it will be perpendicular to the line.

This distance can alternatively be seen as the shortest way by which point A can be brought to line l.

But how can one determine the distance between a point and a line using the equation of a line and the coordinates of the point? Let us explore how we can come up with such a formula.

Distance from a point to a line formula

Let D be a straight line whose equation is given by ax+by+c=0 where a,b are not simultaneously 0, and a point A x0,y0 outside the line, that is not belonging to the line.

The goal is to find the shortest distance between the line D and point P. Let the point where the shortest line segment intersects the line be Q whose coordinates are x1,y1.

The distance between the point and the line D is the same as the length of the line segment formed by points A and Q or the distance between them. We can use the distance formula to do so but we need to know the coordinates of Q in terms of x0 and y0 for that purpose.

Distance from a point to a line, The distance between a point and a line, StudySmarterThe distance between a point and a line, StudySmarter Originals

Recall that the gradient of a line with equation ax+by+c=0 is given by m1=-ab. Now the line segment AQ is perpendicular to the line so its slope will be m2=ba. The reason being that the product of slopes of two perpendicular lines is always -1 that ism1m2=-1.

We now have the slope of the line joining AQ and the coordinates of a point A on it. Using this information, we can now form the equation of line AQ,

y-y0=m2x-x0

y-y0=bax-x0

ay-ay0=bx-bx0

Since Q lies on this line, we can substitute x1,y1 for x,y to find the unknowns x1 and y1.

ay1-ay0=bx1-bx0

But Q also lies on the line ax+by+c=0ax+by+c=0{"x":[[197,198,203],[213,214,215,219,219,219,216,215,213,212,205,202,200,190,175,169,167,165,163,160,158,157,155,155,155,156,159,162,167,169,179,182,193,196,208,212,215,222,225,230,237,238,244,246,249,251,254,257,260,261,267,269,275,277],[316,319,323,327,330,336,343,345,349,352,354,354,352,351,345,342,337,327,324,315,314,311,310],[395,395,396,396,396,396,392,390,388,383,380,377,372,369,367,365,362,360,358,358,358,360,361,366,369,378,382,394,402,406],[467,467,468,471,473,481,485,488,495,499,509,515,522,524,527,532,536,538,539],[492,492,492,493,493,494,494,494,494,494,493,493,493],[587,586,585,585,584,584,582,581,579,578,575,574,573,573,573,572,572,572,573,575,577,579,583,585,593,597,605,608,612,618,621,625,629,631,632,634,635,635,633,631,623,616,609,600,596,583,579,572,570],[685,686,686,687,687,687,686,685,685,685,684,684,687,689,690,694,696,698,701,706,708,710,716,719,721,726,729,733,737,740,741,742,743,743,743,742,742,742,741,741,741,741,741,740,739,738,736,735,733,730,726,724,717,714,706,703,696,693],[793,794,795,796,799,801,807,814,818,829,836,839,845,847,850,851,852,853],[827,827,827,826,827,829,831,832,833,834,834,834,833,833,833,833,834,835,836],[942,942,942,942,941,940,937,932,929,919,916,906,900,897,894,891,891,891,892,894,896,901,903,910,917,925,934,938],[982,984,989,997,1003,1009,1012,1021,1023,1027,1031,1032,1033],[975,975,976,978,980,982,986,989,993,999,1002,1008,1015,1020,1023,1029,1030],[1075,1076,1076,1076,1075,1074,1071,1069,1067,1066,1063,1062,1062,1062,1062,1062,1065,1068,1069,1073,1075,1077,1083,1085,1091,1096,1101,1104,1111,1113,1117,1118,1120,1120,1120,1120,1119,1118,1115,1112,1110,1108,1102,1098,1094,1088,1086,1081,1076,1073,1072]],"y":[[369,369,368],[345,344,342,326,324,319,311,309,307,306,304,304,304,309,330,342,347,354,360,373,380,385,398,402,406,407,408,406,404,402,393,390,378,373,361,357,354,349,347,346,346,348,358,362,373,379,391,403,412,416,424,426,429,428],[321,319,317,316,316,317,322,325,332,339,352,357,369,373,386,390,397,409,410,416,417,417,417],[330,329,327,323,322,320,320,321,323,328,331,335,343,348,353,358,368,374,387,394,401,408,411,418,419,420,420,417,413,409],[356,355,355,354,354,352,351,351,350,350,350,349,348,348,347,344,344,343,343],[327,327,329,334,341,345,360,364,376,379,389,391,394],[261,261,263,265,280,287,305,317,329,335,351,360,364,371,373,376,380,381,383,383,383,380,377,375,368,365,360,359,358,357,357,358,360,361,363,366,367,369,376,379,386,391,395,399,400,402,402,400,398],[327,327,326,328,332,339,347,355,363,366,376,378,382,383,384,384,384,383,382,379,377,374,368,365,362,355,352,345,339,334,333,331,331,334,336,345,350,353,363,373,386,398,405,418,424,430,441,446,456,464,470,473,478,479,478,477,470,467],[364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,363,363,363],[337,336,335,333,331,332,334,337,344,353,368,373,383,393,398,403,405,410,411],[314,313,312,311,309,308,307,309,310,320,324,341,355,367,379,391,400,403,409,412,413,415,416,417,416,414,410,408],[339,339,339,338,337,336,335,334,334,333,333,333,334],[379,380,381,381,382,382,381,381,380,379,378,377,375,374,374,373,372],[307,305,304,303,303,306,314,323,335,343,365,372,377,389,393,397,404,411,413,417,419,420,422,422,421,417,412,408,395,390,374,368,350,344,338,327,322,317,308,304,301,299,296,295,295,297,299,303,307,311,315]],"t":[[0,20,36],[204,220,235,281,282,290,308,315,316,323,336,340,352,360,374,387,390,391,403,407,407,419,425,436,440,441,453,461,473,475,487,492,503,507,520,523,524,536,540,553,560,572,578,587,590,591,602,607,618,624,635,640,652,661],[1017,1026,1036,1043,1052,1057,1073,1074,1086,1090,1102,1107,1119,1124,1135,1140,1152,1157,1172,1174,1186,1190,1191],[1346,1351,1359,1373,1376,1387,1402,1407,1407,1419,1424,1424,1432,1440,1441,1452,1457,1467,1475,1486,1491,1502,1507,1519,1524,1535,1541,1552,1557,1569],[1754,1769,1776,1786,1791,1802,1807,1810,1819,1824,1836,1840,1852,1857,1857,1870,1878,1882,1887],[2043,2078,2082,2092,2102,2108,2119,2124,2136,2141,2152,2157,2158],[2392,2404,2419,2424,2436,2441,2449,2457,2469,2476,2489,2491,2504,2507,2508,2519,2524,2525,2536,2541,2553,2558,2569,2576,2589,2591,2604,2607,2608,2616,2624,2636,2641,2641,2653,2657,2658,2670,2677,2688,2691,2704,2708,2719,2724,2736,2741,2753,2757],[3088,3096,3104,3124,3135,3141,3153,3158,3169,3175,3190,3191,3204,3208,3208,3220,3224,3225,3237,3241,3241,3254,3258,3258,3270,3274,3275,3289,3291,3304,3308,3320,3325,3337,3341,3353,3358,3358,3366,3374,3389,3391,3404,3408,3408,3420,3425,3425,3437,3442,3453,3458,3470,3475,3483,3491,3504,3510],[3822,3831,3843,3853,3858,3858,3870,3875,3887,3894,3903,3911,3916,3925,3933,3933,3941,3953],[4064,4068,4078,4087,4102,4121,4125,4137,4141,4153,4158,4170,4175,4188,4195,4200,4208,4220,4225],[4451,4460,4462,4471,4476,4487,4494,4507,4508,4522,4525,4537,4541,4554,4558,4571,4575,4587,4592,4592,4604,4608,4609,4621,4625,4637,4642,4650],[4923,4930,4934,4935,4947,4950,4958,4970,4975,4987,4992,4992,5004],[5175,5184,5188,5189,5195,5203,5208,5209,5221,5225,5226,5238,5242,5254,5259,5271,5275],[5486,5502,5505,5511,5517,5525,5537,5542,5554,5559,5571,5575,5578,5588,5592,5592,5604,5609,5621,5625,5626,5638,5642,5642,5655,5659,5671,5676,5688,5692,5700,5709,5721,5725,5726,5738,5742,5743,5750,5759,5759,5771,5775,5776,5788,5792,5793,5805,5809,5821,5825]],"version":"2.0.0"}, so it will satisfy the equation of line D, hence we have

ax1+by1+c=0ax1+by1+c=0{"x":[[203,204,205,205,206,207,207,208,208,208,208,205,204,202,201,197,195,192,187,184,181,174,171,166,161,156,154,149,148,146,146,148,150,153,155,157,160,165,168,171,177,180,183,190,192,198,203,208,212,216,218,222,222,225,225,226,226,227,227,227,227,227,228,229],[276,277,283,289,297,303,310,318,320,327,329,332,332,332,330,327,323,317,312,306,301,299,296],[351,349,346,343,340,337,335,329,326,323,321,314,312,308,308,307,308,310,314,319,322,331,335,339,347,351],[398,398,398,398,398,398,398,398,397,397,397,396,396,396,396],[439,440,443,446,447,449,457,460,469,472,475,478,483,490,494],[468,467,466,466,466,466,466,465,465,462,460,459,459,458,458,458,458,459],[550,550,550,550,550,550,549,548,547,546,543,543,541,540,540,539,539,538,538,539,540,542,545,547,551,553,555,560,566,571,579,584,588,590,592,592,589,587,580,578,569,567,564,559,556,554,552,549,548],[629,629,630,630,630,631,630,630,630,630,630,631,632,635,636,641,642,644,648,651,653,658,661,663,665,669,671,673,677,679,681,683,684,684,684,683,682,680,680,678,676,675,674,673,672,669,669,667,666,664,662,660,658,656,653,651,646,644],[711,711,711,712,712,712,713,714,715,715,715,716,716,717,717,717,717,717,719,720],[749,748,746,749,750,758,760,764,771,774,778,785,789,793,796,801,804,807,809,811],[771,773,774,775,776,776,777,777,775,774,771,770,769,767,766,765,765,764,764,764,764,765,766,768],[916,915,904,901,895,886,882,877,873,863,859,856,849,845,840,838,838,841,845,848,859,863,878,884,899,904],[965,968,970,974,982,985,991,994,997,1003,1006,1008,1011,1013,1014],[942,942,942,943,946,948,951,962,966,980,983,994,999,1002,1007,1010,1013,1016,1020],[1069,1069,1069,1068,1068,1065,1064,1063,1061,1059,1058,1057,1057,1057,1059,1063,1067,1068,1075,1078,1081,1087,1090,1099,1102,1104,1109,1114,1115,1119,1120,1122,1124,1124,1124,1123,1120,1115,1110,1105,1099,1092,1087,1081,1076,1070]],"y":[[263,262,261,260,260,257,255,249,247,240,237,231,228,227,226,224,224,224,226,227,230,236,240,248,258,270,277,295,302,313,316,322,324,325,325,325,325,322,320,317,312,309,305,298,294,287,281,275,271,269,268,270,272,281,285,289,297,302,306,309,317,320,324,333],[255,253,248,246,245,244,245,247,249,254,257,266,272,276,284,291,299,307,314,320,325,327,329],[253,254,254,256,260,262,266,273,278,282,287,301,305,318,322,328,331,336,340,343,344,346,346,346,345,344],[336,337,338,340,344,347,350,353,359,362,365,371,374,376,380],[284,285,286,287,287,288,289,289,289,289,289,288,287,286,285],[256,256,255,258,260,271,275,290,295,308,315,321,325,330,335,337,339,340],[203,207,211,221,233,240,247,258,263,268,279,283,290,294,297,302,304,309,311,312,311,310,308,307,304,303,302,300,298,296,296,296,296,298,301,302,308,310,316,318,324,326,327,330,331,331,331,331,330],[255,256,258,259,261,270,278,282,286,292,295,304,306,312,313,315,315,315,313,312,310,306,303,300,297,289,285,281,273,269,263,258,255,253,252,255,257,267,271,283,293,305,311,317,323,340,344,353,357,365,370,375,376,377,378,378,375,374],[335,336,337,339,340,341,346,349,352,355,360,363,366,374,379,384,387,390,391,390],[288,288,289,290,290,290,290,290,289,289,289,288,287,287,286,284,284,283,282,281],[252,252,252,252,252,253,259,262,274,279,292,297,301,309,312,316,319,325,328,330,334,336,338,339],[241,240,239,239,242,246,249,253,257,269,274,280,292,299,311,321,329,335,341,343,347,348,348,347,343,341],[272,272,272,272,272,272,271,271,270,270,269,269,269,269,269],[318,319,320,321,321,321,321,318,317,314,313,311,311,310,310,309,309,309,308],[232,233,237,243,247,264,270,281,293,306,311,317,327,331,338,344,349,351,354,355,355,355,353,347,344,341,334,325,320,310,306,300,289,284,274,264,256,247,239,232,227,224,222,222,223,230]],"t":[[0,7,11,19,27,39,45,56,62,72,77,90,94,94,106,111,111,123,127,128,139,144,144,156,162,173,177,189,195,206,211,223,227,240,244,244,256,261,261,273,277,278,290,294,294,306,312,322,328,340,344,356,361,373,377,378,390,394,398,406,411,411,422,430],[732,749,752,754,761,771,777,789,795,806,811,819,827,839,844,856,861,872,877,889,894,895,906],[1092,1108,1113,1114,1120,1128,1128,1139,1144,1145,1156,1161,1173,1178,1189,1194,1195,1206,1212,1223,1228,1239,1244,1247,1256,1261],[1554,1560,1570,1578,1589,1594,1595,1606,1611,1611,1623,1628,1628,1640,1644],[1964,1978,1981,1986,1989,1995,2006,2012,2023,2028,2028,2040,2045,2056,2061],[2240,2245,2249,2270,2278,2290,2296,2306,2312,2323,2328,2340,2345,2356,2361,2362,2373,2376],[2609,2637,2645,2657,2662,2662,2674,2678,2678,2690,2695,2695,2707,2712,2713,2724,2729,2740,2745,2757,2762,2774,2778,2790,2795,2795,2807,2812,2820,2828,2840,2846,2857,2862,2873,2879,2890,2895,2907,2912,2924,2928,2929,2937,2945,2948,2957,2962,2966],[3248,3261,3264,3265,3271,3278,3290,3295,3297,3307,3312,3324,3328,3340,3345,3357,3362,3362,3370,3379,3379,3390,3395,3396,3407,3412,3412,3424,3431,3431,3444,3445,3454,3463,3473,3490,3496,3507,3512,3524,3529,3540,3545,3546,3558,3564,3574,3579,3579,3591,3595,3607,3612,3613,3624,3629,3641,3646],[3943,3948,3953,3954,3962,3966,3974,3979,3979,3991,3995,3996,4008,4012,4024,4029,4041,4046,4058,4067],[4336,4351,4354,4371,4380,4390,4396,4396,4408,4412,4413,4425,4431,4432,4444,4445,4446,4454,4462,4474],[4634,4641,4647,4654,4655,4662,4674,4680,4691,4696,4708,4712,4713,4721,4729,4729,4741,4746,4746,4758,4762,4763,4775,4778],[5134,5150,5153,5155,5163,5173,5179,5180,5192,5196,5196,5208,5213,5213,5225,5230,5241,5246,5258,5263,5275,5279,5291,5296,5308,5312],[5605,5610,5615,5617,5629,5641,5646,5646,5659,5663,5663,5671,5679,5680,5688],[5826,5831,5843,5844,5854,5855,5863,5875,5880,5892,5896,5909,5913,5913,5926,5930,5930,5942,5946],[6193,6209,6213,6214,6222,6230,6238,6246,6258,6263,6263,6276,6280,6280,6292,6297,6309,6313,6325,6330,6332,6342,6347,6359,6363,6363,6376,6380,6392,6396,6397,6409,6413,6414,6426,6433,6445,6446,6455,6463,6475,6480,6492,6497,6509,6527]],"version":"2.0.0"}

The above two lines intersect at Q and hence can be solved simultaneously in order to determine the unknowns x1 and y1, writing the first equation in terms of x1,

x1=-c-by1a

Substituting the expression of x1 in ay1-ay0=bx1-bx0, we get

ay1-ay0=b-c-by1a-bx0-bc-b2y1-a2y1+a2y0-abx0=0

Solving fory1 we get,

ay1=ay0-bac+by1-bx0{"x":[[58,58,57,57,56,55,52,49,47,42,39,36,34,32,31,29,29,30,32,34,38,46,53,57,59,59,58,58,58,58,59,60,62,64,65,68,69,73,77],[89,89,89,89,89,90,91,91,93,94,96,103,108,112,118,122,123,124,124,123,121,120,120,119,119,118,118,118,117,115,114,113,111,108,106,105,102,100,95,93,92,88],[140,140,139,139,138,138,137,136,136,137],[177,176,175,176,177,182,189,191],[178,180,181,184,190,191,195,197,199],[301,301,301,301,300,296,291,289,286,282,280,279,278,278,279,283,287,289,294,296,300,301,302,302,302,302,302,303,305,308],[326,326,326,325,325,325,324,324,324,324,324,324,326,327,329,335,342,346,347,350,352,352,352,352,350,348,347,346,346,346,346,346,345,344,344,342,341,339,336,333,330,327,325],[367,367,367,367,368,369,369,369,368,368,368,368,368,370,371,375,380,381,382,383,382,379,377,372,370,369],[428,426,426,425,427,429,431,438,444,451,454],[515,515,516,516,516,516,516,516,515,514,513,513,512,512,510,510,511,513,516,518,519,522,525,526,528,529,529,525,520,516,512,511],[504,500,499,501,502,508,511,517,524,527,531,539,541,543],[517,519,519,519,519,517,517,514,507,499,495,494,494,495,498,501,503,509,514,519,520,521,522,522,522,523,526,528,529,531],[594,593,593,593,592,591,589,588,583,579,577,575,575,576,577,580,582,588],[627,627,626,625,623,620,616,614,614,616,618,622,630],[651,651,654,656,658,660,665],[662,661,660,659,659,659,659,659,659,659,659,659,659,659],[694,694,694,694,694,693,692,692,691,690,689,688,688,687,686,685,685,687,689,691,694,698,699,701,703,703,703,703,701,699,696,694,693,691],[727,727,727,728,728,728,728,728,728,727,726,726,729,734,738,743,750,751,753,753,753,752,751,750,748,747,745,744,742,741,740,740,739,739,738,736,732,731,729,726,725,722],[768,767,766,766,766,766,767,767,767,768,768,768,769],[802,802,802,803,804,805,808,809,813,813,814,812,810,809,804,802,796,794,791],[862,861,860,863,872,874,879,885,886,888,887,886,885,884],[928,928,927,927,926,926,926,925,925,924,923,922,921,919,917,916,916,918,923,926,928,933,934,938,939,939,939,937,933,928,925,924,923,922,920,919],[970,970,969,969,970,974,978,981,983,985,986,986,983,982,978,978,977],[1000,998,998,997,996,993,991,990,987,986,983,983,985,990,998,1005,1009],[1027,1027,1026,1025,1024,1024,1026,1027,1032,1035,1037,1038,1040,1038,1036,1034,1030,1028,1027]],"y":[[171,170,169,167,166,165,163,163,163,166,170,175,178,183,186,194,198,199,200,200,198,191,183,177,175,176,180,184,186,192,194,197,200,200,200,198,196,193,189],[172,169,168,167,168,171,173,175,186,190,193,192,189,185,178,172,170,165,164,164,166,170,172,178,181,187,190,195,209,218,227,230,236,243,244,245,245,245,242,241,239,234],[206,205,205,208,215,217,222,227,231,232],[183,183,182,182,181,181,181,181],[196,196,196,195,193,192,191,191,190],[181,178,177,176,173,172,173,174,178,184,186,190,192,193,196,196,194,193,190,189,185,185,184,185,186,187,188,190,192,192],[179,178,177,177,176,175,174,175,178,179,183,184,190,191,194,195,191,187,185,180,176,174,173,171,170,170,175,184,189,193,201,205,210,218,221,228,232,234,235,234,232,230,226],[226,225,224,223,222,222,223,226,230,231,234,236,238,240,240,238,232,230,227,223,222,220,220,219,220,220],[190,190,189,189,189,189,189,189,189,188,188],[163,158,157,156,155,154,157,158,163,170,173,175,178,180,188,192,193,191,189,187,186,185,185,185,186,188,191,194,196,197,197,196],[226,227,227,227,227,227,227,227,226,226,226,225,225,225],[268,267,266,265,263,261,260,260,261,268,273,278,279,281,281,281,280,277,274,271,271,271,274,275,278,281,282,282,281,280],[173,172,171,170,169,168,168,170,177,187,190,203,217,219,222,227,228,232],[184,182,181,180,180,184,190,196,199,200,201,201,199],[191,190,190,189,189,189,188],[184,183,183,182,183,184,185,186,188,189,192,197,198,199],[169,166,165,163,162,163,168,169,173,175,181,183,185,188,190,193,195,195,195,194,193,192,192,192,192,193,195,196,198,201,202,202,202,201],[183,182,181,179,178,177,178,180,182,187,194,199,202,202,201,199,195,194,192,191,190,189,189,189,190,190,192,193,196,197,201,209,213,224,231,236,241,242,242,239,238,233],[220,218,218,217,218,221,223,224,226,229,230,232,233],[163,162,161,161,163,164,170,172,182,186,195,207,210,214,220,223,229,231,234],[190,190,190,190,190,190,190,190,190,190,190,190,190,190],[166,162,161,159,159,158,159,159,164,165,172,175,183,191,197,198,200,199,195,193,192,191,191,191,191,194,196,200,203,206,207,208,208,208,206,206],[185,184,183,182,181,182,183,185,186,189,194,196,201,202,205,206,207],[183,181,180,181,183,187,189,190,194,196,202,204,208,210,210,210,209],[222,223,226,227,231,235,236,236,235,234,232,231,227,223,221,221,220,220,220]],"t":[[0,8,8,18,24,35,51,58,68,74,83,91,101,108,108,124,135,142,151,158,168,185,201,218,224,241,251,258,268,274,285,291,301,308,318,324,325,335,347],[858,859,868,884,901,908,923,925,943,950,959,975,985,991,1008,1018,1025,1035,1052,1068,1085,1091,1102,1108,1118,1125,1125,1135,1141,1152,1158,1171,1175,1185,1192,1194,1202,1209,1218,1225,1225,1235],[3034,3068,3075,3092,3109,3119,3126,3136,3153,3169],[3666,3676,3693,3717,3726,3736,3753,3761],[3905,3943,3943,3951,3959,3970,3976,3976,3987],[4466,4475,4479,4484,4503,4520,4536,4543,4553,4559,4570,4576,4576,4589,4593,4609,4620,4626,4639,4643,4654,4661,4670,4689,4693,4693,4704,4709,4726,4743],[4985,4993,5010,5010,5020,5026,5043,5060,5070,5076,5087,5093,5104,5110,5120,5137,5153,5160,5170,5176,5187,5193,5204,5210,5220,5237,5253,5269,5276,5287,5293,5293,5304,5310,5310,5324,5327,5337,5343,5352,5360,5370,5376],[5837,5841,5845,5852,5868,5894,5905,5910,5927,5927,5935,5946,5960,5971,5976,5987,6004,6010,6021,6027,6037,6043,6054,6060,6071,6075],[13649,13655,13658,13671,13689,13696,13707,13713,13730,13740,13757],[14263,14271,14276,14277,14281,14297,14313,14323,14330,14340,14346,14347,14358,14363,14374,14390,14407,14423,14430,14441,14446,14457,14463,14474,14480,14497,14507,14524,14538,14555,14563,14574],[14949,14952,14957,14977,14980,14990,14997,15007,15013,15014,15025,15030,15041,15047],[15343,15352,15356,15363,15380,15390,15397,15407,15424,15441,15457,15463,15472,15480,15491,15497,15509,15514,15530,15541,15547,15558,15574,15580,15591,15610,15624,15630,15631,15640],[16183,16189,16197,16208,16225,16230,16241,16247,16264,16275,16280,16291,16308,16314,16314,16325,16331,16342],[17445,17448,17464,17475,17492,17509,17524,17539,17557,17564,17578,17581,17598],[17792,17806,17839,17848,17860,17864,17881],[17997,17998,18006,18014,18049,18057,18064,18067,18076,18082,18092,18108,18115,18125],[18277,18280,18286,18290,18298,18331,18348,18351,18358,18367,18375,18381,18382,18393,18398,18409,18425,18442,18449,18463,18465,18481,18492,18498,18511,18516,18526,18531,18543,18559,18575,18581,18593,18598],[19017,19024,19032,19051,19065,19075,19101,19107,19115,19126,19142,19159,19176,19182,19193,19198,19215,19226,19232,19243,19248,19260,19265,19276,19282,19282,19294,19299,19310,19316,19326,19332,19343,19348,19360,19365,19382,19392,19398,19410,19415,19426],[19741,19756,19766,19773,19791,19798,19810,19815,19827,19832,19843,19848,19856],[20075,20081,20093,20107,20115,20126,20132,20143,20149,20162,20165,20177,20182,20182,20194,20199,20210,20215,20223],[20987,20988,21007,21032,21049,21060,21066,21077,21082,21094,21099,21110,21116,21121],[21312,21317,21325,21332,21344,21349,21360,21366,21377,21382,21394,21400,21411,21427,21432,21444,21449,21482,21499,21510,21516,21527,21532,21544,21550,21561,21566,21577,21593,21599,21610,21616,21616,21628,21632,21644],[22010,22015,22032,22049,22066,22083,22093,22099,22111,22116,22127,22133,22144,22150,22161,22166,22166],[22348,22355,22367,22391,22399,22410,22416,22416,22426,22433,22445,22449,22461,22477,22483,22494,22500],[22952,23025,23041,23050,23061,23077,23083,23095,23100,23111,23116,23128,23133,23150,23161,23167,23178,23183,23188]],"version":"2.0.0"}

Expanding the brackets and rearranging the terms, we get

ay1=a2y0-bc-b2y1-abx0a

Multiplying both sides by a, we get

a2y1+b2y1=a2y0-abx0-bc{"x":[[86,87,87,87,86,84,83,81,80,74,71,65,63,60,59,59,60,62,67,69,75,78,83,85,90,90,92,92,93,93,94,95,96,98,98,102,103,108,110],[115,111,110,112,113,117,120,121,123,123,124,125,126,126,124,122,118,114,114,117,125,130],[158,158,158,159,159,160,160,160,160,159,159,159,159,159,160,165,172,174,178,182,183,185,186,185,184,183,182,181,180,180,179,179,179,178,177,176,175,173,170,169,166,165,163,160],[204,204,204,204,205,205,205,205,205,204,203,203],[246,245,244,243,242,242,243,248,249,252,255,259,260,261],[256,255,255,255,255,254,252,251],[319,319,319,318,317,314,313,312,310,310,309,309,309,310,312,313,317,324,325,331,333,334,334,333,328,326,323,318,316,312],[348,349,349,349,349,349,351,352,352,355,356,356,354,351,349,348,346,350,352,360,363],[387,387,387,387,388,389,390,390,390,391,392,393,395,399,401,406,409,411,412,414,415,415,415,414,413,411,411,409,408,408,407,407,404,403,401,399,397,396,392,391],[441,440,440,440,440,441,441,441,442,442],[485,484,483,485,491,497,503,505,507],[487,486,485,486,487,491,495,499,505,511,512,515],[604,604,604,604,604,602,598,596,595,593,590,589,587,586,588,590,593,597,600,606,610,613,614,614,614,614,615],[627,627,627,627,627,627,627,629,632,635,636,636,634,633,631,630,627,626,625,627,637,642],[672,672,672,671,671,671,671,672,672,673,673,674,675,677,678,680,685,688,691,692,694,695,695,694,693,692,691,690,687,684,681,680,679,677,675,673,673],[704,704,704,705,707,708,708,709,709,709,709,709,709,709,710,711,712,714,716,717,717,717,717,709,708],[749,748,751,752,757,759,764,769,770,772,771],[811,812,813,813,814,814,814,815,815,812,810,807,803,800,799,797,794,794,795,798,799,802,804,807,808,811,813,813,814,815,815,816,817,822,823],[847,847,846,846,846,846,847,848,850,850,850,850,849,847,843,842,841,843,844,848,849,854,855,858,860,862,862,862,862,859,858,855,854,851,848,847,846],[892,891,890,890,890,889,892,896,899,899,900,900,900,899,898,894,893,895,901,903,908,909,913,914,915,914,912,909,909,908,908,908,910,913],[931,930,930,930,929,929,929,929,930,931,933,934,935,936,937,937,937,937,934,933,930,929],[970,968,967,968,974,975,978,983,985,987,988,990],[1025,1025,1025,1025,1025,1025,1025,1025,1025,1025,1024,1023,1021,1021,1018,1017,1017,1016,1017,1018,1021,1023,1027,1030,1032,1035,1036,1036,1036,1036,1035,1033,1032,1030,1027,1025,1023,1022,1021,1021],[1074,1075,1076,1076,1077,1078,1078,1078,1077,1074,1072,1069,1067,1065,1063,1064,1067,1071,1073,1080]],"y":[[219,218,216,214,210,208,208,208,208,212,215,223,227,235,239,242,242,243,242,241,236,234,228,226,220,219,217,218,218,221,222,228,235,238,239,241,241,238,236],[161,157,155,153,153,153,153,153,154,155,156,157,162,163,169,171,177,181,182,182,180,178],[202,200,199,197,195,195,197,199,202,209,211,213,217,218,222,223,219,218,215,211,209,205,200,199,198,198,199,201,205,214,225,228,235,245,249,251,255,257,260,260,260,259,258,255],[243,240,239,240,244,245,250,251,254,258,261,262],[219,219,219,219,219,220,221,223,223,223,223,223,223,222],[217,215,214,217,220,223,231,237],[199,196,195,194,197,209,215,219,229,231,237,239,242,243,243,242,241,238,238,237,238,240,241,244,247,248,249,250,250,250],[184,180,179,176,175,174,174,174,175,178,184,185,190,196,199,201,205,205,205,202,202],[220,218,217,216,215,216,219,221,224,230,235,236,237,237,236,233,229,226,224,221,216,215,214,213,213,219,222,228,235,238,241,251,263,265,270,270,269,268,265,263],[260,258,257,258,261,265,267,271,273,276],[224,224,224,224,223,223,223,223,223],[241,241,241,241,241,240,240,239,238,237,237,237],[237,236,234,232,230,229,231,232,234,236,242,244,249,252,252,251,248,245,242,238,236,237,241,242,244,246,247],[205,203,201,200,197,195,194,193,194,196,201,205,209,210,213,214,217,218,220,220,218,216],[225,223,222,221,220,221,222,226,232,233,235,237,238,239,239,239,236,234,231,230,226,224,223,225,231,235,241,243,252,261,269,271,273,274,272,271,270],[264,262,261,260,259,259,261,261,265,266,269,271,273,274,274,274,273,271,268,266,263,262,261,259,259],[232,232,232,232,231,231,231,231,231,231,232],[232,230,229,228,227,226,225,222,221,220,220,222,225,228,230,231,235,239,239,239,239,236,235,233,232,230,230,231,231,234,235,237,239,241,241],[204,203,202,200,199,198,198,199,203,205,211,216,218,227,236,237,240,239,239,237,236,234,233,232,232,233,234,235,237,241,242,244,244,245,245,244,242],[220,220,219,218,217,217,218,220,223,224,226,228,229,231,233,236,237,235,230,229,225,223,220,219,218,218,221,225,227,231,232,235,238,240],[250,250,251,252,253,254,257,258,260,260,260,260,260,258,257,255,254,253,251,251,250,249],[232,232,232,232,232,232,232,232,232,232,232,232],[210,207,206,205,203,202,203,204,209,212,220,223,231,234,241,244,245,246,246,246,243,242,240,239,239,239,240,241,242,244,245,247,248,249,250,250,250,250,248,247],[229,228,228,227,226,224,223,222,222,225,227,230,233,235,240,243,245,245,245,245]],"t":[[0,4,13,31,47,64,70,70,81,86,95,103,113,120,130,137,147,153,163,170,180,186,199,204,214,220,229,245,247,253,265,270,286,299,303,314,320,332,337],[604,613,629,646,654,664,675,678,679,687,687,695,703,714,720,731,737,753,764,780,797,809],[1267,1272,1275,1287,1304,1315,1320,1331,1337,1349,1354,1354,1367,1370,1383,1398,1414,1420,1431,1437,1447,1454,1470,1483,1487,1498,1504,1520,1531,1547,1567,1571,1581,1587,1597,1600,1604,1615,1620,1631,1637,1647,1654,1662],[1870,1880,1887,1920,1937,1948,1954,1966,1970,1981,1987,1996],[3700,3704,3721,3738,3754,3765,3782,3805,3815,3821,3832,3838,3848,3852],[3988,3998,4005,4064,4073,4091,4096,4113],[4504,4511,4514,4530,4546,4564,4571,4582,4588,4599,4605,4615,4622,4638,4648,4655,4668,4683,4692,4708,4713,4722,4732,4738,4755,4765,4772,4782,4788,4799],[5035,5038,5043,5055,5066,5072,5088,5099,5105,5116,5132,5138,5149,5165,5172,5172,5188,5205,5217,5222,5233],[5634,5643,5649,5656,5672,5691,5697,5708,5714,5730,5748,5756,5766,5772,5783,5789,5799,5805,5816,5822,5833,5839,5841,5850,5866,5883,5889,5899,5905,5906,5916,5922,5939,5949,5955,5972,5983,5989,6000,6007],[6371,6380,6389,6422,6439,6451,6455,6469,6472,6483],[7011,7015,7031,7064,7081,7098,7106,7116,7120],[7244,7249,7256,7273,7283,7289,7302,7306,7323,7333,7339,7347],[8044,8048,8057,8073,8082,8100,8116,8123,8123,8134,8140,8151,8156,8173,8190,8200,8206,8220,8223,8240,8250,8267,8282,8289,8300,8316,8323],[8775,8784,8790,8798,8806,8823,8834,8850,8867,8884,8900,8917,8923,8934,8940,8940,8951,8956,8973,8984,9000,9012],[9372,9380,9386,9390,9407,9432,9440,9451,9468,9474,9485,9490,9490,9501,9508,9518,9523,9535,9540,9551,9557,9573,9584,9601,9617,9623,9634,9640,9651,9668,9673,9684,9690,9713,9723,9740,9746],[9910,9914,9924,9934,9951,9968,9973,9985,9990,10002,10007,10018,10023,10035,10040,10051,10057,10068,10073,10085,10090,10102,10124,10134,10140],[13791,13842,13876,13884,13892,13904,13908,13920,13925,13936,13952],[14649,14659,14662,14667,14675,14676,14684,14700,14711,14727,14734,14742,14753,14759,14759,14770,14775,14792,14809,14820,14825,14837,14842,14854,14859,14870,14886,14892,14892,14909,14909,14920,14925,14942,14951],[15089,15093,15100,15117,15125,15136,15143,15154,15170,15175,15187,15192,15204,15209,15226,15236,15242,15267,15275,15287,15293,15304,15309,15321,15325,15337,15342,15354,15359,15376,15386,15392,15404,15409,15420,15425,15437],[15801,15807,15810,15821,15826,15837,15868,15885,15901,15909,15920,15926,15926,15938,15942,15959,15976,16001,16019,16026,16037,16043,16054,16059,16071,16087,16092,16109,16120,16126,16137,16142,16159,16167],[16350,16436,16452,16459,16470,16476,16487,16493,16504,16510,16521,16526,16538,16543,16554,16559,16560,16571,16576,16588,16593,16598],[27977,27988,27999,28022,28040,28047,28058,28064,28075,28080,28092,28097],[28279,28289,28292,28294,28305,28314,28330,28341,28347,28359,28364,28376,28380,28392,28397,28409,28414,28425,28441,28447,28459,28464,28475,28480,28492,28497,28514,28515,28526,28531,28542,28547,28559,28564,28576,28580,28592,28598,28609,28615],[28858,28865,28866,28876,28881,28893,28897,28914,28939,28947,28958,28964,28976,28981,28997,29008,29014,29026,29031,29042]],"version":"2.0.0"}

a2+b2y1=a2y0-abx0-bc{"x":[[72,73,73,74,75,76,76,75,74,71,66,58,53,52,51,53,54,55,59,67,76,81,81,81,80,80,80,80,81,84,86],[108,105,104,103,103,104,105,109,113,115,115,115,114,110,106,105,104,107,109,115,118],[133,131,134,140,144,148,153,155],[148,147,146,145,145,145,144,143,142,142,143],[182,182,182,182,182,182,182,182,182,182,182,182,181,181,181,181,181,181,181,184,186,189,193,195,196,197,196,194,193,192,190,189,188,186],[212,211,210,210,209,209,210,211,212,213,216,219,221,222,222,219,218,215,215,213,215,217,219,221,227],[34,34,34,34,34,34,34,33,32,31,29,27,24,23,21,24,29,32],[251,251,251,252,255,256,258,260,261,264,264,264,259,255,250,245],[293,293,293,293,293,294,295,296,296,296,296,296,296,299,302,307,309,316,317,320,323,324,324,324,323,321,319,318,317,317,317,317,317,316,315,313,310,306,305],[361,361,361,360,360,360,358,357,357,357,357],[405,404,405,408,413,414,417],[402,400,399,401,407,409,413,416,424,427],[535,536,536,535,533,532,531,525,520,519,516,516,518,525,526,528,531,534,537,538,539,539,540,540,541,541,542,543,546,549,550],[562,561,560,559,559,559,559,561,565,569,570,570,568,565,563,561,560,560,564,572,576],[597,597,596,596,596,596,597,597,597,597,597,598,604,607,611,617,618,620,620,619,618,617,616,615,614,613,613,612,612,611,611,609,607,606,602,601,598,597],[638,638,638,638,639,639,638,638,638,639,640,642,646,647,648,649,650,649,648,646,641,640],[674,673,673,674,677,681,687,690,696],[748,748,748,748,747,745,743,740,739,734,731,730,729,729,730,732,736,739,740,743,745,746,749,750,751,753,754,754,755],[784,783,782,782,781,780,780,779,779,779,778,777,777,776,775,775,775,776,778,779,783,784,787,791,793,793,792,788,783,782,780,778,778],[820,820,819,819,818,819,822,824,825,826,826,827,826,825,823,822,821,822,823,824,826,830,832,838,843,844,843,843,841,840,839,838,838,838,841,842,843],[861,862,862,863,864,864,865,865,864,864,863,862,862,863,863,864,866,867,871,873,873,873,871,867,866,864],[897,896,899,901,903,908,910,917,918,922,923,924],[954,954,954,955,955,956,958,957,956,954,951,951,950,951,952,955,958,961,964,966,966,966,966,963,962,960,957,956,953,952,951],[998,998,998,998,998,998,996,995,994,990,989,986,985,983,983,985,986,990,996,999,1006,1008,1010]],"y":[[204,204,203,203,202,199,195,193,193,193,196,204,213,215,217,219,219,219,218,212,206,200,201,203,206,207,210,214,215,216,216],[165,164,163,162,161,160,160,159,159,162,163,164,169,174,178,180,180,180,179,177,177],[210,210,210,209,209,209,208,207],[201,200,199,198,199,200,206,212,219,220,225],[186,183,182,181,180,179,181,185,189,194,196,200,202,205,208,210,212,214,215,215,214,213,212,212,213,215,218,220,221,221,222,222,222,221],[163,161,161,160,159,157,157,155,155,154,153,153,154,158,160,165,167,172,173,177,178,178,177,177,176],[186,185,184,183,182,181,180,180,180,180,182,186,194,198,209,222,228,230],[173,170,169,169,171,172,174,179,182,191,194,200,210,217,223,228],[183,181,180,179,178,178,180,186,195,197,202,206,207,209,208,206,204,199,197,194,189,187,185,183,181,181,185,190,197,200,208,211,217,224,226,229,229,226,225],[225,223,222,223,224,228,235,238,240,243,244],[193,193,193,193,193,193,193],[210,211,212,212,212,211,210,210,208,208],[200,198,197,195,193,193,193,194,199,201,205,210,212,210,209,208,206,203,201,201,201,202,205,206,209,210,211,212,213,213,212],[168,166,166,165,164,163,162,160,159,160,163,167,172,175,179,182,183,184,184,181,180],[191,190,190,189,188,189,190,193,194,199,202,206,207,206,203,198,197,195,194,194,194,196,197,201,203,209,219,227,231,233,235,238,238,237,235,234,230,226],[225,224,223,222,223,225,229,230,233,235,235,234,231,230,229,227,226,223,222,221,221,221],[201,201,200,200,200,199,199,199,199],[209,206,205,204,202,201,201,201,202,206,210,214,215,216,217,217,216,214,213,212,212,211,211,211,211,212,214,215,216],[186,181,180,179,177,177,176,177,183,185,190,197,199,207,213,214,216,216,215,214,212,211,209,208,207,209,212,216,218,218,218,217,216],[203,202,202,201,200,201,203,204,206,206,208,211,212,214,217,217,218,216,214,213,212,207,205,201,197,197,199,200,203,205,209,210,213,216,218,218,218],[226,226,225,225,224,223,222,223,226,227,229,232,233,235,236,236,236,235,233,230,227,226,224,222,222,222],[203,203,204,204,204,204,204,203,203,203,203,203],[188,186,185,183,182,181,187,194,199,206,213,215,216,216,214,212,209,207,207,207,208,209,211,214,215,216,217,218,218,218,217],[204,201,200,199,198,196,196,196,196,198,199,203,205,210,211,215,216,217,218,218,217,217,216]],"t":[[0,6,21,29,39,54,71,89,96,108,112,129,146,157,163,172,179,179,189,206,223,239,263,273,279,289,297,305,313,323,339],[693,702,713,730,740,756,763,773,790,807,813,813,823,840,846,856,863,879,894,896,907],[1202,1216,1238,1256,1263,1273,1290,1294],[1424,1436,1439,1446,1480,1480,1496,1517,1521,1531,1540],[1684,1688,1697,1699,1707,1723,1738,1747,1757,1763,1774,1780,1780,1790,1796,1797,1807,1813,1824,1840,1846,1857,1874,1880,1889,1896,1913,1923,1930,1941,1946,1957,1963,1971],[2174,2179,2182,2189,2197,2213,2224,2230,2230,2241,2247,2257,2274,2293,2297,2307,2314,2326,2331,2341,2360,2363,2364,2374,2380],[2909,2915,2924,2930,2941,2947,2958,2964,2974,2980,2991,2997,3007,3014,3024,3039,3047,3055],[3453,3462,3465,3472,3489,3497,3497,3508,3518,3522,3532,3541,3547,3558,3564,3574],[4024,4028,4032,4042,4058,4064,4075,4091,4112,4115,4125,4131,4141,4147,4158,4164,4175,4181,4191,4197,4208,4214,4225,4231,4242,4258,4275,4291,4297,4308,4314,4325,4331,4342,4347,4356,4372,4389,4397],[4798,4801,4823,4856,4865,4873,4889,4898,4908,4914,4915],[5399,5407,5441,5457,5464,5474,5479],[5565,5573,5581,5607,5625,5627,5631,5642,5648,5659],[6376,6382,6386,6398,6415,6425,6431,6442,6457,6465,6475,6492,6509,6535,6540,6540,6549,6565,6576,6582,6592,6598,6609,6616,6626,6632,6632,6643,6659,6665,6673],[6826,6830,6833,6840,6848,6859,6865,6876,6893,6909,6926,6943,6948,6959,6965,6982,6982,6993,6998,7015,7021],[7403,7416,7419,7423,7432,7449,7459,7465,7476,7482,7499,7509,7536,7540,7550,7565,7576,7582,7593,7599,7615,7626,7632,7643,7649,7660,7676,7693,7699,7699,7710,7715,7732,7743,7749,7760,7765,7780],[7924,7931,7950,7974,8007,8024,8032,8043,8049,8066,8076,8082,8093,8099,8099,8111,8116,8124,8133,8143,8149,8160],[8447,8451,8466,8476,8482,8495,8510,8518,8523],[8887,8898,8904,8908,8924,8933,8943,8949,8961,8966,8983,8993,8999,9011,9016,9024,9041,9049,9060,9066,9066,9078,9083,9083,9094,9099,9116,9127,9133],[9265,9276,9278,9283,9293,9299,9310,9327,9343,9349,9362,9366,9377,9383,9399,9410,9416,9433,9444,9449,9461,9467,9477,9494,9510,9518,9535,9549,9566,9577,9583,9594,9599],[9912,9916,9933,9944,9966,9983,10000,10011,10016,10028,10033,10044,10049,10061,10066,10078,10094,10111,10116,10117,10128,10133,10146,10150,10166,10177,10196,10200,10211,10217,10228,10234,10241,10258,10266,10280,10281],[10510,10517,10525,10533,10551,10558,10575,10600,10616,10627,10633,10644,10650,10662,10666,10667,10679,10684,10692,10708,10717,10727,10733,10750,10761,10766],[13130,13159,13210,13217,13228,13234,13243,13251,13259,13268,13278,13284],[13461,13467,13472,13478,13496,13509,13537,13551,13562,13568,13584,13595,13601,13618,13629,13645,13662,13679,13684,13701,13701,13712,13718,13734,13745,13751,13762,13768,13779,13784,13796],[13991,13995,14000,14002,14009,14018,14034,14045,14051,14063,14068,14080,14085,14096,14101,14113,14118,14130,14134,14146,14151,14163,14166]],"version":"2.0.0"}

Now we shall divide by a2+b2{"x":[[213,214,214,214,214,214,214,214,212,210,208,206,200,198,191,189,183,179,176,175,174,174,174,175,176,179,181,182,204,207,215,218,227,231,232,234,238,241,243,247,249,251,256,258,260,266,269,275,280],[288,286,283,282,281,281,280,279,279,280,281,285,289,293,295,297,300,302,307,309,309,310,310,309,308,305,302,299,296,294,293,292,292,295,298,303,306,316,319,323,331],[374,375,376,378,379,387,391,402,409,414,421,424,427,436,442],[408,409,412,413,414,417,419,421,421,421,421,421,420,420,420],[503,503,503,503,504,505,505,505,505,505,505,504,504,503,503,503,504,504,505,506,508,510,511,513,523,527,531,535,539,542,543,544,543,542,537,534,529,527,523,517,516,514],[553,553,553,553,554,556,559,561,563,570,575,579,583,584,588,589,590,590,588,585,581,579,577,575,572,571,570,570,571,575,577,584,593,598,609,615]],"y":[[303,299,297,294,291,289,286,284,281,279,277,277,278,279,287,290,303,313,324,329,334,342,344,346,347,348,348,348,332,328,318,314,306,306,308,310,319,326,331,337,340,343,346,347,348,348,348,346,342],[220,218,216,215,214,213,210,207,205,202,200,197,195,193,193,193,193,194,198,202,205,212,215,221,225,232,238,245,250,255,257,262,263,265,265,265,265,263,263,262,261],[317,317,317,317,317,316,315,313,312,311,310,310,309,308,307],[294,293,294,295,297,302,309,317,326,330,337,341,344,349,354],[216,217,221,224,239,251,262,272,283,292,296,310,313,324,327,333,334,335,336,336,334,333,332,331,327,327,327,328,329,330,332,333,337,338,343,346,349,350,351,351,350,347],[200,198,195,194,191,190,188,186,186,184,184,184,186,187,190,191,195,196,201,206,210,212,214,217,220,222,223,225,226,226,226,225,223,222,220,218]],"t":[[0,8,13,15,21,30,35,35,46,52,63,68,80,85,96,102,113,118,130,135,136,146,152,152,163,169,169,180,213,218,230,235,257,260,261,271,280,285,296,302,303,313,318,319,330,335,336,344,352],[618,623,628,635,635,646,652,662,669,679,685,696,702,713,719,719,729,735,749,752,761,769,779,785,786,796,802,813,819,829,835,846,852,863,869,879,885,896,902,902,916],[1150,1161,1164,1165,1170,1179,1186,1196,1203,1213,1219,1219,1230,1235,1257],[1431,1442,1461,1469,1469,1480,1486,1494,1502,1513,1519,1519,1530,1536,1546],[1782,1788,1803,1812,1819,1830,1836,1845,1852,1863,1869,1883,1886,1896,1902,1913,1919,1919,1930,1936,1949,1952,1953,1961,1983,1986,1996,2003,2013,2019,2030,2037,2047,2052,2063,2069,2080,2086,2097,2102,2113,2119],[2376,2383,2390,2403,2403,2413,2419,2420,2430,2436,2447,2453,2463,2469,2480,2486,2497,2503,2513,2519,2530,2536,2536,2547,2553,2553,2564,2569,2580,2586,2586,2597,2603,2614,2619,2624]],"version":"2.0.0"}, to get

y1=a2y0-abx0-bca2+b2

Substituting this back into x1=-c-by1a to determine x1, we get

x1=-ca-baa2y0-abx0-bca2+b2{"x":[[39,38,37,36,35,33,34,39,43,45,51,56,54,49,43,36,34,35],[83,82,81,81,79,75,74,70,67,64,62,60,58,61,70,76],[107,107,107,107,107,107,107,107,107,106,105,105],[146,145,145,144,146,147,151,158,160,162,164],[151,150,152,153,159,166,169,173],[238,237,236,235,236,238,240,244,246,252,257,259,260],[297,297,297,296,296,295,293,292,285,280,276,278,280,282,286,288,295],[270,268,267,266,265,266,269,274,289,293,300,309,311,313,311,309],[299,300,300,300,300,300,299,297,294,292,289,288,284,282,282,282,284,285,289,294,296,300,301,303,305,306,306,306,307,309],[347,346,345,344,343,344,349,358,369,372],[418,418,418,418,417,417,416,416,415,414,413,413,413,415,419,420,423,424,427,429,430,431,431,430,429,426,425,422,419,418,415,415],[406,405,406,407,411,416,427,439,446,446,445],[428,430,430,430,431,431,430,429,427,424,423,419,416,415,414,413,413,413,415,420,421,425,426,428,430,431,432,433,435,438,442],[510,510,511,511,510,506,500,494,490,489,489,490,495,505,509],[570,570,570,569,569,566,563,562,555,549,546,547,551,554,558,559,561,565,568,570,571,571,572,572,572,574,575],[594,593,593,591,590,590,591,595,600,602,602,602,599,593,592,590,592,597,599,605],[623,623,623,623,623,622,622,622,625,627,631,637,642,644,645,643,642,641,640,640,639,639,639,637,637,635,634,631,625,623],[660,660,660,661,661,660,660,659,659,659,660,661,663,670,673,673,671,670,668,661,660,658,657],[690,689,688,689,692,693,696,698,700,704,709,710],[737,738,738,739,740,740,740,740,739,735,731,726,725,723,722,722,723,725,726,727,731,735,736,739,741,742,743,744,745,747,748],[774,774,773,773,772,772,773,773,773,772,772,770,768,768,769,772,777,778,781,783,784,785,785,781,777,773,772,771,771],[807,806,805,805,804,804,806,809,810,812,814,815,815,815,813,811,810,809,812,814,815,819,820,825,827,828,828,828,825,824,823,822,822,825],[841,842,843,843,844,845,845,845,845,845,844,843,844,846,847,850,850,852,852,851,848,846],[882,881,880,881,882,887,894,895,898,900],[925,925,925,925,925,925,925,925,924,923,922,922,922,923,925,929,933,934,935,936,937,936,936,933,931,927,926,925,923],[959,957,957,956,955,954,953,952,951,951,950,948,948,948,948,949,951,957,959,963],[612,614,622,627,645,660,675,715,726,748,783,795,830,842,870,886,899,904,911,913,915,914,912,909,905,902],[690,691,692,692,693,693,692,689,687,682,677,672,671,670,668,668,668,669,672,673,677,679,680,683,685,689,690,693,694,695,695,696,698,699],[720,718,717,717,719,720,724,726,726,727,727,725,724,721,720,717,718,724,730],[752,751,750,749,753,760,762,766,770,771],[763,763,763,763,762,762,762,762,761,761,761,761,761,761],[805,804,804,803,802,802,802,802,802,801,801,801,799,799,798,799,803,804,806,809,810,812,812,813,812,811,808,805,803,801,799],[829,829,828,828,828,829,830,832,835,837,837,838,837,835,832,831,829,827,829,836,839,844],[1001,1000,1000,1000,1002,1004,1007,1009,1010,1013,1013,1008,1006,998,995,986,980,977,971,969,965]],"y":[[128,128,128,127,127,125,124,123,123,123,124,130,137,144,149,153,152,151],[125,125,125,124,124,123,124,126,129,133,135,139,145,150,149,148],[152,151,150,149,150,152,156,158,165,172,179,181],[125,125,124,124,123,123,123,123,123,123,123],[139,139,138,138,137,135,135,134],[132,132,132,132,132,132,132,132,132,131,130,130,130],[124,122,120,119,118,118,117,117,122,128,135,140,140,140,140,140,139],[168,169,169,169,169,169,170,170,169,169,168,167,167,166,166,167],[201,200,199,198,196,195,193,192,192,193,195,196,202,208,209,212,213,213,212,209,208,206,205,204,204,206,207,208,209,209],[149,149,149,148,148,148,148,149,148,147],[122,117,116,115,114,117,126,129,134,142,144,151,154,154,152,152,150,150,150,150,150,151,152,154,155,156,157,157,158,158,157,156],[179,178,178,178,178,177,177,177,177,178,178],[210,209,208,207,206,202,201,199,198,198,198,201,205,207,208,211,213,214,214,214,213,212,212,211,211,212,214,217,218,217,215],[122,119,117,113,110,109,116,133,150,168,174,191,207,214,214],[129,127,126,125,122,121,122,123,129,137,143,143,141,139,136,134,133,130,129,130,131,132,134,135,138,141,141],[101,99,98,96,95,94,94,94,97,99,103,105,109,115,116,117,117,117,117,116],[124,122,121,120,123,127,131,136,139,140,140,138,134,131,128,127,127,128,133,141,154,157,164,171,173,174,174,173,168,166],[152,150,149,150,154,155,158,162,163,165,166,166,166,161,157,153,151,150,149,148,148,148,148],[132,131,130,130,130,130,130,130,130,130,129,129],[135,133,132,131,128,127,125,124,123,122,124,127,129,134,135,137,139,139,139,139,137,133,132,131,130,130,130,133,135,137,137],[107,105,104,102,101,103,109,111,115,121,123,128,133,134,134,132,130,129,128,128,128,130,132,136,138,139,139,138,137],[123,123,123,122,122,121,121,122,122,123,126,127,129,130,132,135,135,137,135,134,132,130,129,125,123,122,121,122,124,126,128,131,134,136],[142,142,142,141,141,140,141,142,143,145,148,152,153,153,152,149,148,145,142,140,139,138],[122,122,122,122,122,122,122,122,122,122],[108,106,105,104,103,106,112,113,119,126,129,130,132,132,131,129,128,128,128,129,129,131,132,134,135,136,136,137,136],[127,125,124,123,122,121,121,121,123,124,126,129,130,131,134,135,136,137,137,136],[186,186,186,186,186,185,185,182,182,181,180,180,179,178,178,178,178,178,178,178,179,179,180,180,181,181],[228,227,227,226,225,224,222,220,220,220,223,228,229,231,233,235,237,238,238,237,235,234,234,232,232,230,230,230,232,235,238,240,240,239],[198,196,196,195,195,195,195,196,197,197,200,203,204,208,209,211,212,210,209],[225,225,225,225,225,224,223,223,223,222],[219,218,217,216,215,216,217,221,226,227,230,231,233,234],[209,206,205,205,204,206,207,211,213,218,220,223,229,231,233,232,231,231,230,229,229,229,230,232,233,236,238,240,240,240,239],[210,209,209,208,207,206,206,205,205,205,206,207,210,212,215,216,217,219,219,217,216,215],[116,116,115,116,118,121,127,131,136,151,162,177,182,197,202,214,222,225,233,235,239]],"t":[[0,2,13,30,31,43,59,76,82,93,99,116,136,151,158,174,192,199],[665,671,674,675,683,700,710,716,726,733,743,749,760,777,792,805],[1248,1252,1259,1283,1300,1310,1317,1327,1333,1350,1360,1369],[1882,1885,1891,1900,1925,1933,1944,1959,1966,1967,1974],[2100,2106,2125,2133,2142,2158,2167,2178],[2577,2581,2585,2592,2625,2633,2644,2650,2651,2667,2677,2684,2690],[3087,3091,3099,3102,3111,3117,3128,3134,3157,3159,3175,3193,3200,3211,3217,3217,3233],[3725,3729,3734,3743,3743,3759,3767,3778,3797,3801,3813,3817,3826,3834,3851,3864],[4249,4259,4278,4284,4301,4311,4317,4334,4345,4351,4360,4368,4378,4397,4401,4412,4417,4427,4434,4451,4461,4467,4478,4484,4495,4513,4517,4529,4535,4557],[4892,4895,4904,4918,4927,4945,4961,4976,4994,5004],[5416,5420,5426,5426,5435,5468,5485,5495,5501,5514,5518,5529,5548,5562,5581,5584,5594,5602,5612,5618,5629,5635,5645,5651,5663,5668,5679,5685,5696,5702,5711,5721],[6076,6086,6101,6104,6112,6118,6135,6159,6160,6177,6188],[6415,6419,6427,6435,6446,6461,6469,6479,6494,6501,6512,6518,6535,6535,6546,6552,6562,6568,6579,6596,6603,6615,6619,6630,6635,6647,6652,6668,6685,6702,6710],[7279,7283,7287,7302,7313,7329,7346,7362,7379,7385,7398,7402,7419,7435,7446],[9816,9819,9824,9826,9836,9853,9863,9870,9880,9897,9914,9930,9947,9953,9970,9970,9981,9986,10003,10014,10020,10020,10031,10037,10049,10065,10080],[10396,10403,10408,10420,10436,10447,10464,10480,10497,10514,10520,10531,10536,10553,10564,10570,10586,10597,10603,10612],[10985,10993,10998,11003,11037,11053,11064,11081,11097,11103,11114,11120,11137,11156,11172,11187,11203,11214,11231,11248,11264,11270,11281,11287,11298,11303,11315,11320,11337,11348],[11708,11720,11737,11770,11787,11798,11804,11815,11821,11831,11837,11837,11849,11864,11881,11887,11898,11904,11915,11920,11929,11933,11937],[12792,12796,12804,12837,12854,12856,12865,12871,12871,12887,12898,12904],[13088,13092,13097,13104,13121,13132,13138,13149,13154,13175,13179,13196,13196,13213,13221,13229,13238,13248,13263,13267,13271,13287,13298,13304,13315,13321,13332,13348,13365,13382,13386],[13509,13513,13521,13529,13546,13571,13588,13598,13604,13616,13622,13632,13649,13654,13671,13688,13704,13715,13721,13732,13738,13754,13765,13782,13798,13815,13821,13833,13836],[14187,14188,14191,14196,14205,14215,14246,14255,14266,14271,14288,14299,14304,14316,14321,14333,14338,14349,14381,14388,14388,14400,14406,14416,14432,14438,14449,14455,14471,14482,14488,14505,14515,14532],[14791,14794,14805,14816,14832,14849,14871,14883,14888,14900,14905,14921,14938,14949,14955,14966,14971,14983,14999,15016,15021,15037],[15886,15889,15907,15940,15952,15955,15972,15983,15989,16000],[16184,16185,16190,16191,16197,16222,16239,16249,16255,16272,16283,16289,16300,16317,16333,16350,16366,16372,16384,16389,16389,16405,16416,16422,16434,16439,16450,16455,16467],[16658,16659,16664,16672,16683,16689,16706,16716,16722,16734,16739,16751,16755,16756,16766,16772,16784,16800,16806,16817],[17339,17398,17406,17414,17422,17433,17439,17456,17467,17472,17484,17489,17501,17507,17518,17522,17534,17539,17551,17554,17556,17572,17583,17589,17601,17606],[18064,18068,18078,18090,18091,18101,18117,18136,18139,18151,18168,18178,18181,18181,18192,18200,18206,18223,18234,18239,18251,18256,18256,18267,18274,18285,18290,18301,18317,18323,18339,18350,18373,18379],[18553,18556,18564,18590,18606,18617,18623,18639,18640,18651,18656,18668,18673,18685,18689,18701,18717,18734,18745],[19059,19062,19065,19073,19106,19123,19134,19140,19149,19156],[19250,19258,19266,19290,19301,19323,19334,19351,19356,19368,19373,19373,19384,19388],[19530,19532,19541,19557,19566,19584,19590,19602,19607,19619,19624,19635,19640,19652,19657,19690,19707,19718,19723,19735,19740,19752,19757,19769,19773,19785,19801,19807,19819,19823,19840],[20037,20046,20049,20053,20065,20083,20090,20102,20107,20123,20124,20135,20140,20152,20157,20169,20176,20192,20198,20215,20223,20232],[20758,20763,20774,20790,20801,20807,20819,20825,20836,20840,20852,20857,20869,20874,20886,20890,20902,20907,20919,20924,20936]],"version":"2.0.0"}

Reducing to a common denominator, we get

x1=-c(a2+b2)-ba2y0+ab2x0+b2caa2+b2

Upon simplification, we have

x1=-a2c-b2c-a2by0+ab2x0+b2ca(a2+b2)

Upon further simplification by eliminating the like terms, we get

x1=b2x0-aby0-aca2+b2

Now we have obtained the coordinates of point Q in terms of the constants we know,

Qb2x0-aby0-aca2+b2,a2y0-abx0-bca2+b2

Now we can calculate the distance between A and Q using the distance, which is nothing but the distance from the point to the line as we discussed earlier. Let us denote it by d and apply the distance formula,

d2=x1-x02+y1-y02

Substituting for x1,y1 we get

d2=b2x0-aby0-ac-a2x0-b2x0a2+b2+a2y0-aby0-bc-a2y0-b2y0a2+b2

Upon further simplification, we get

d2=a2ax0+by0+c2+b2ax0+by0+c2(a2+b2)2

d2=a2+b2ax0+by0+c2a2+b22

d2=ax0+by0+c2a2+b2

Taking the square root on both sides, we get,

d=±ax0+by0+ca2+b2

Since d is distance, it cannot be negative so we reject the negative root, giving us,

d=ax0+by0+ca2+b2

But there is still a possibility when the numerator ax0+by0+c is negative. To avoid it being negative, its modulus has to be taken,

d=ax0+by0+ca2+b2

We don’t run into that problem since the denominator is a sum of squares of non-zero numbers, so it will always be positive.

To write the same expression in a more convenient (and easy to remember) form, let us define the equation of the line as fx,y=ax+by+c to get fx0,y0=ax0+by0+c, leaving us with,

d=|fx0,y0|a2+b2

Now let us apply this formula through a couple of examples.

Calculating the distance from a point to a line

Calculating the distance from a line to a point is a relatively straightforward process. The equation of a line shall be given and the point to which the distance should be calculated.

Find the distance between the line 4x+3y-2=0 and the point 2,4.

Solution

Comparing the given equation to the general form, we get a=4, b=3 and c=-2, and x0=2, y0=4.

Recalling the distance formula and substituting all the corresponding values we get,

d=ax0+by0+ca2+b2=42+34-242+32=185

Thus, the distance between the line 4x+3y-2=0 and 2,4 is 185 units.

Find the distance between the line 5x-2y=0{"x":[[208,204,202,199,195,190,187,178,175,166,164,156,154,152,149,147,146,144,143,142,141,140,139,139,138,137,135,134,132,131,129,128,126,125,123,123,123,123,123,123,124,125,127,132,135,140,142,151,154,164,168,178,181,185,190,192,194,198,199,202,202,202,200,199,197,193,190,185,179,173,170,163],[260,260,261,263,266,271,274,280,284,287,295,298,304,307,315,317,317,315,313,304,301,297,291,287,283,278,275,273],[346,348,348,349,349,348,345,341,339,332,329,321,319,316,315,315,317,318,321,323,325,330,337,345,353,357],[414,414,415,418,422,427,430,442,445,452,458,466,468,469,470],[508,508,508,508,511,514,519,522,525,528,534,539,543,545,548,549,550,550,548,545,543,535,532,524,519,515,513,512,510,510,510,511,513,514,519,522,528,536,543,552,560,563,573,577],[618,619,620,621,622,622,623,623,623,624,624,625,625,626,628,629,630,634,637,640,644,646,649,654,657,660,664,666,671,675,679,680,683,684,684,683,682,680,678,676,673,671,669,668,667,666,666,665,665,664,663,661,660,656,654,644,640,638,633,632],[757,758,760,762,766,771,774,785,788,794,796,799,804],[732,733,738,741,748,760,764,777,786,794,798,802,805,812],[889,890,890,890,888,887,884,883,880,879,877,875,875,873,873,873,874,877,879,886,889,897,903,907,914,917,920,927,931,933,939,942,944,949,951,954,957,958,958,956,955,949,942,936,932,927,923,915,907,900,897,895,891,889,888,886]],"y":[[227,229,229,230,231,233,234,238,239,241,242,243,243,243,243,242,242,242,242,242,242,243,245,247,249,254,263,271,278,282,293,297,307,310,318,320,322,325,326,327,327,327,325,320,316,312,310,304,303,298,298,298,298,299,302,304,307,312,315,325,332,336,344,348,352,360,363,370,376,380,382,384],[296,294,290,286,283,280,279,277,276,276,276,276,278,280,289,298,301,312,316,329,332,336,343,346,349,353,355,356],[278,277,275,275,274,274,275,278,279,285,288,297,301,312,318,324,330,332,336,338,340,342,343,343,342,341],[293,294,294,294,294,294,293,292,292,291,290,289,289,289,289],[267,266,264,263,260,258,257,256,256,256,257,259,262,264,268,273,276,279,286,293,296,307,311,320,326,331,333,335,338,340,341,342,342,342,342,342,341,339,337,334,332,331,328,327],[269,269,269,269,270,272,277,284,288,303,308,321,324,328,333,336,338,342,344,345,345,345,345,342,340,338,333,331,325,319,313,310,303,302,298,298,300,306,309,316,324,334,345,352,358,371,377,391,401,412,422,429,432,440,442,445,442,441,436,433],[302,302,302,303,303,303,303,303,303,303,303,303,304],[351,351,352,351,350,346,345,342,341,340,340,340,340,339],[256,256,254,253,256,257,266,270,280,287,293,309,315,329,343,356,361,376,381,390,393,398,399,399,397,395,393,388,384,380,370,365,359,347,342,329,317,306,300,284,279,267,260,256,255,254,254,255,258,262,265,267,272,274,277,281]],"t":[[0,10,12,14,25,35,39,51,55,68,72,85,89,89,101,105,118,122,123,130,139,151,156,156,168,172,185,189,201,207,218,223,235,239,251,256,256,264,272,284,289,301,306,318,322,334,340,351,356,368,373,385,389,390,402,406,406,417,422,431,439,452,456,456,468,472,473,485,489,501,507,514],[846,852,857,858,864,872,884,889,889,901,906,906,918,923,940,948,956,967,973,984,989,989,1001,1006,1006,1014,1023,1023],[1188,1195,1199,1201,1206,1218,1223,1235,1240,1251,1256,1268,1273,1284,1289,1301,1306,1318,1323,1323,1335,1339,1351,1356,1368,1370],[1625,1639,1656,1668,1674,1684,1690,1701,1707,1718,1723,1735,1739,1740,1748],[2016,2025,2035,2041,2051,2056,2065,2073,2073,2085,2090,2102,2106,2107,2118,2123,2131,2132,2140,2152,2156,2168,2173,2185,2190,2202,2206,2207,2215,2223,2235,2240,2240,2252,2256,2257,2269,2273,2285,2290,2302,2306,2318,2324],[2536,2553,2558,2559,2565,2567,2574,2585,2590,2602,2607,2618,2623,2626,2635,2640,2640,2648,2657,2668,2673,2673,2686,2690,2690,2702,2706,2707,2719,2724,2735,2740,2752,2757,2769,2785,2790,2802,2807,2819,2823,2835,2840,2840,2852,2859,2860,2869,2873,2886,2890,2902,2907,2919,2923,2941,2949,2957,2969,2971],[3355,3369,3372,3374,3382,3390,3402,3407,3419,3423,3424,3436,3441],[3610,3625,3629,3634,3640,3652,3657,3669,3674,3686,3690,3691,3702,3707],[3963,3968,3975,3982,4007,4018,4024,4036,4040,4041,4053,4057,4057,4070,4074,4086,4091,4103,4107,4119,4124,4136,4140,4153,4157,4157,4170,4174,4174,4186,4190,4191,4203,4207,4208,4217,4224,4236,4241,4253,4257,4269,4274,4282,4291,4291,4303,4307,4316,4324,4325,4336,4340,4341,4349,4350]],"version":"2.0.0"} and the point 3,0.

Solution

Comparing the given equation to the general form, we get a=5, b=-2 and c=0, and x1,y1=3,0.

Recalling the distance formula and substituting all the corresponding values we get,

d=ax0+by0+ca2+b2=5(3)+0+052+(-2)2=1529

Thus, the distance between the line 5x-2y=0 and (3,0) is 1529 units.

Distance from a point to a line example

Find the distance between the two lines whose equations are given by y=2x-5 and y=2x+3.

Solution

Notice that the two lines have the same slope, 2, which implies that they are parallel.

To find the distance between the two lines, we can take a point on one of those lines and use the ‘distance from a point to a line’ formula to get the distance.

Let us find the point on the first line y=2x-5 by substituting x=0 (as it is easy to calculate, any other value of x would have been equally valid),

y=2(0)-5=-5

Thus one point on the line is (0,-5). Now we can use the formula we derived earlier to find the distance between this point and the line y=2x+3.

d=ax1+by1+ca2+b2

But first, we rewrite y=2x+3 in the general form to get, -2x+y-3=0, and hence we have a=-2, b=1 and c=-3, which we substitute in the above equation to get d:

d=0-5-35=85

Therefore, the distance between the point (0,-5) and the line y=2x+3 is 85 units.

But remember that this point lies on the line y=2x-5 and these lines are parallel, so the distance between the two lines is also 85 as described earlier.

Distance from a Point to a Line - Key takeaways

    • The distance between a point and a line can be measured in many distinct ways but the shortest distance between them is the one that counts.
    • The distance between a point and a line is measured by the shortest distance between them, it is also the same as the perpendicular distance between them.
    • Let a line be given by ax+by+c=0, then the distance between this line and the point x1,y1 is given by the formula d=ax1+by1+ca2+b2.

Frequently Asked Questions about Distance from a Point to a Line

The closest distance between a line given by f(x,y)=ax+by+c=0 and a point (x1,y1) is given by d=|f(x1,y1)|/(a2+b2)1/2

The shortest distance between a point and a line is the same as the perpendicular distance between them.

The distance from a point to a line is the measure of the shortest path between them. 

The distance from any point from to the origin is the root of the sum of squares of its coordinates: d2=(-3)2+42

which gives us d=5. Hence the distance of that point is 5 units from the origin. 

The distance from any point from to the origin is the root of the sum of squares of its co-ordinates: d2=(-6)2+82

which gives us d=10. Hence the distance of that point is 10 units from the origin. 

More about Distance from a Point to a Line

Join over 22 million students in learning with our StudySmarter App

The first learning app that truly has everything you need to ace your exams in one place

  • Flashcards & Quizzes
  • AI Study Assistant
  • Study Planner
  • Mock-Exams
  • Smart Note-Taking
Join over 22 million students in learning with our StudySmarter App Join over 22 million students in learning with our StudySmarter App

Sign up to highlight and take notes. It’s 100% free.

Entdecke Lernmaterial in der StudySmarter-App

Google Popup

Join over 22 million students in learning with our StudySmarter App

Join over 22 million students in learning with our StudySmarter App

The first learning app that truly has everything you need to ace your exams in one place

  • Flashcards & Quizzes
  • AI Study Assistant
  • Study Planner
  • Mock-Exams
  • Smart Note-Taking
Join over 22 million students in learning with our StudySmarter App