Distance from a Point to a Line: Distance Formula
2015-11-25 14:56
This applet demonstrates the geometric derivation of the distance formula from a point to a line. By constructing lines, points, perpendicular segments, polygons, and angles, it visually illustrates using coordinate geometry to find the distance. Ideal for classroom teaching, it helps students understand the geometric meaning and algebraic derivation of the formula.
In collections
函數、方程式、參數式
Loading the GeoGebra board and drawing, please wait…
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.168.0" id="e538e508-8e59-4006-b451-f4518dd8abe9" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="1249" height="773" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.27381905524419536" orientation="1" />
</panes>
<views>
<view id="4097" visible="false" inframe="true" stylebar="true" location="1,1,1" size="400" window="370,56,764,648" />
<view id="2" visible="false" inframe="false" stylebar="false" location="3,3" size="302" window="100,100,250,400" />
<view id="8" toolbar="1001 | 1002 | 1003 || 1005 | 1004 || 1006 | 1007 | 1010 || 1008 1009 || 66 68 || 6" visible="false" inframe="false" stylebar="false" location="3,1" size="300" window="100,100,600,400" />
<view id="512" toolbar="0 | 1 501 5 19 , 67 | 2 15 45 18 , 7 37 | 514 3 9 , 13 44 , 47 | 16 | 551 550 11 , 20 22 21 23 , 55 56 57 , 12 | 69 | 510 511 , 512 513 | 533 531 , 534 532 , 522 523 , 537 536 , 535 | 521 520 | 36 , 38 49 560 | 571 30 29 570 31 33 | 17 | 540 40 41 42 , 27 28 35 , 6 , 502" visible="false" inframe="false" stylebar="false" location="1,1" size="500" window="100,100,600,400" />
<view id="1" visible="true" inframe="false" stylebar="true" location="1" size="887" window="100,100,600,400" />
<view id="4" toolbar="0 || 2020 , 2021 , 2022 , 66 || 2001 , 2003 , 2002 , 2004 , 2005 || 2040 , 2041 , 2042 , 2044 , 2043" visible="false" inframe="false" stylebar="true" location="1" size="305" window="100,100,600,400" />
<view id="16" visible="true" inframe="false" stylebar="true" location="3" size="342" window="50,50,500,500" />
<view id="32" visible="false" inframe="false" stylebar="true" location="1" size="150" window="50,50,500,500" />
<view id="64" toolbar="0" visible="false" inframe="true" stylebar="true" location="1" size="150" window="50,50,500,500" />
<view id="70" toolbar="0 || 2020 || 2021 || 2022" visible="false" inframe="true" stylebar="true" location="1" size="150" window="50,50,500,500" />
</views>
<toolbar show="true" items="0 39 | 1 501 67 , 5 19 , 72 | 2 15 45 , 18 65 , 7 37 | 4 3 8 9 , 13 44 , 58 , 47 | 16 51 64 , 70 | 10 34 53 11 , 24 20 22 , 21 23 | 55 56 57 , 12 | 36 46 , 38 49 50 , 71 | 30 29 54 32 31 33 | 17 26 62 73 , 14 68 | 25 52 60 61 | 40 41 42 , 27 28 35 , 6 || 100001" position="1" help="false" />
<input show="true" cmd="true" top="algebra" />
<dockBar show="true" east="true" />
</perspective>
</perspectives>
<labelingStyle val="3"/>
<font size="28"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="887" height="549"/>
<coordSystem xZero="311.43415239642576" yZero="228.53915602606764" scale="38.510706923626365" yscale="38.51070692362631"/>
<evSettings axes="false" grid="true" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" checkboxSize="26" gridType="0"/>
<bgColor r="255" g="255" b="255"/>
<axesColor r="0" g="0" b="0"/>
<gridColor r="192" g="192" b="192"/>
<lineStyle axes="1" grid="10"/>
<axis id="0" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
</euclidianView>
<euclidianView>
<viewNumber viewNo="2"/>
<size width="342" height="549"/>
<coordSystem xZero="176.0000000000001" yZero="373.9999999999999" scale="50.00000000000003" yscale="49.99999999999998"/>
<evSettings axes="false" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" checkboxSize="26" gridType="0"/>
<bgColor r="255" g="255" b="255"/>
<axesColor r="0" g="0" b="0"/>
<gridColor r="192" g="192" b="192"/>
<lineStyle axes="1" grid="10"/>
<axis id="0" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
</euclidianView>
<kernel>
<continuous val="false"/>
<usePathAndRegionParameters val="true"/>
<decimals val="2"/>
<angleUnit val="degree"/>
<algebraStyle val="0"/>
<coordStyle val="0"/>
<angleFromInvTrig val="false"/>
</kernel>
<scripting blocked="false" disabled="false"/>
<construction title="" author="" date="">
<element type="numeric" label="c">
<value val="0.0"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0.1"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="-5" max="5" absoluteScreenLocation="true" width="200.0" x="75.0" y="332.0" fixed="true" horizontal="true" showAlgebra="false"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="0.1" speed="1" type="0" playing="false"/>
</element>
<element type="numeric" label="b">
<value val="4.0"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0.1"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="-5" max="5" absoluteScreenLocation="true" width="200.0" x="77.0" y="254.0" fixed="true" horizontal="true" showAlgebra="false"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="0.1" speed="1" type="0" playing="false"/>
</element>
<element type="numeric" label="a">
<value val="3.0"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0.1"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="-5" max="5" absoluteScreenLocation="true" width="200.0" x="75.0" y="181.0" fixed="true" horizontal="true" showAlgebra="false"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="0.1" speed="1" type="0" playing="false"/>
</element>
<element type="point" label="P">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="1" playing="false"/>
<coords x="4.0" y="3.0" z="1.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="a_1" exp="(a * x) + (b * y) = c" type="line" />
<element type="line" label="a_1">
<show object="true" label="false" ev="8"/>
<objColor r="0" g="0" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="3.0" y="4.0" z="0.0"/>
<lineStyle thickness="7" type="15" typeHidden="1"/>
<eqnStyle style="implicit"/>
</element>
<command name="Intersect">
<input a0="a_1" a1="OrthogonalLine[P, a_1]"/>
<output a0="Q"/>
</command>
<element type="point" label="Q">
<show object="true" label="true" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="-26" y="37"/>
<labelMode val="0"/>
<coords x="28.0" y="-21.0" z="25.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Segment">
<input a0="P" a1="Q"/>
<output a0="dist"/>
</command>
<element type="segment" label="dist">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="-52" y="15"/>
<labelMode val="2"/>
<coords x="3.84" y="-2.88" z="-6.720000000000001"/>
<lineStyle thickness="7" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<expression label="A2" exp=""點到線的距離有很多,是指哪一條呢?""/>
<element type="text" label="A2">
<show object="false" label="false" ev="11"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<expression label="text1" exp="" " + (LaTeX[P]) + " 到 $" + LaTeX[a] + " x+" + LaTeX[b] + "y=" + LaTeX[c] + "$ 的距離為何?"" />
<element type="text" label="text1">
<show object="true" label="false" ev="11"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="0"/>
<startPoint x="-3.0600000000000005" y="7.2" z="1.0"/>
</element>
<command name="Intersect">
<input a0="a_1" a1="OrthogonalLine[P, y = 0]"/>
<output a0="A"/>
</command>
<element type="point" label="A">
<show object="true" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="35" y="9"/>
<labelMode val="0"/>
<coords x="16.0" y="-12.0" z="4.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Intersect">
<input a0="a_1" a1="OrthogonalLine[P, x = 0]"/>
<output a0="B"/>
</command>
<element type="point" label="B">
<show object="true" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="-8" y="-7"/>
<labelMode val="0"/>
<coords x="-12.0" y="9.0" z="3.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Point">
<input a0="yAxis"/>
<output a0="C"/>
</command>
<element type="point" label="C">
<show object="false" label="true" ev="4"/>
<objColor r="125" g="125" b="255" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="-14" y="33"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="0.0" y="3.6832393793963907" z="1.0"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<element type="point" label="D">
<show object="false" label="true" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="-8" y="6"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="4.396917733152699" y="0.30569567295220934" z="1.0"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Polygon">
<input a0="B" a1="P" a2="A"/>
<output a0="poly1" a1="a_2" a2="b_1" a3="p"/>
</command>
<element type="polygon" label="poly1">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<condition showObject="n > 0"/>
<objColor r="153" g="51" b="0" alpha="0.1"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<element type="segment" label="a_2">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<coords x="0.0" y="8.0" z="-24.0"/>
<lineStyle thickness="7" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="b_1">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<coords x="6.0" y="0.0" z="-24.0"/>
<lineStyle thickness="7" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="p">
<show object="true" label="false" ev="4"/>
<objColor r="153" g="51" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<coords x="-6.0" y="-8.0" z="0.0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Angle">
<input a0="B" a1="P" a2="A"/>
<output a0="α"/>
</command>
<element type="angle" label="α">
<angleStyle val="0"/>
<value val="1.5707963267948966"/>
<show object="true" label="false" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.1"/>
<layer val="0"/>
<labelOffset x="-15" y="51"/>
<labelMode val="2"/>
<lineStyle thickness="2" type="0" typeHidden="2"/>
<arcSize val="30"/>
</element>
<command name="Angle">
<input a0="A" a1="Q" a2="P"/>
<output a0="β"/>
</command>
<element type="angle" label="β">
<angleStyle val="0"/>
<value val="1.5707963267948966"/>
<show object="true" label="false" ev="4"/>
<condition showObject="n > 2"/>
<objColor r="0" g="0" b="255" alpha="0.1"/>
<layer val="0"/>
<labelOffset x="22" y="5"/>
<labelMode val="2"/>
<lineStyle thickness="2" type="0" typeHidden="2"/>
<arcSize val="30"/>
</element>
<element type="point" label="E">
<show object="false" label="true" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="-0.5308183904630946" y="-0.726093764643911" z="1.0"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<element type="point" label="F">
<show object="false" label="true" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="-38" y="19"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="2.1884932067484275" y="1.4007822149708584" z="1.0"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="markarclength">
<input a0="Q" a1="P" a2="F"/>
<output a0="text5" a1="g"/>
</command>
<element type="text" label="text5">
<show object="true" label="false" ev="4"/>
<condition showObject="n > 3"/>
<objColor r="255" g="0" b="0" alpha="0.0"/>
<bgColor r="255" g="239" b="213" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="1"/>
<decimals val="2"/>
<startPoint exp="F"/>
<labelOffset x="-53" y="-22"/>
</element>
<element type="conicpart" label="g">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="7" type="20" typeHidden="1"/>
<eigenvectors x0="1.0" y0="0.0" z0="1.0" x1="-0.0" y1="1.0" z1="1.0"/>
<matrix A0="1.0" A1="1.0" A2="17.739277669585217" A3="0.0" A4="-7.068365048452919" A5="2.30127378633969"/>
<eqnStyle style="implicit"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="numeric" label="n">
<value val="5.0"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0.1"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="0" max="5" absoluteScreenLocation="true" width="200.0" x="62.0" y="445.0" fixed="true" horizontal="true" showAlgebra="false"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<command name="Segment">
<input a0="A" a1="B"/>
<output a0="h"/>
</command>
<element type="segment" label="h">
<show object="true" label="false" ev="4"/>
<condition showObject="n > 2"/>
<objColor r="0" g="0" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-6.0" y="-8.0" z="0.0"/>
<lineStyle thickness="7" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<expression label="text11" exp=""$h$""/>
<element type="text" label="text11">
<show object="true" label="false" ev="20"/>
<condition showObject="n < 4"/>
<objColor r="255" g="0" b="0" alpha="0.0"/>
<bgColor r="255" g="239" b="213" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="false" sizeM="1.0" size="0" style="0"/>
<startPoint x="1.536667783572975" y="1.6290439986062397" z="1.0"/>
</element>
<element type="point" label="G">
<show object="false" label="true" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="-28" y="-9"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="1.967803724493072" y="1.3315950359082298" z="1.0"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<expression label="text6" exp=""公式 $\frac{|ax_0+by_0+c|}{\sqrt{a^2+b^2}}$""/>
<element type="text" label="text6">
<show object="true" label="false" ev="40"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<bgColor r="255" g="255" b="255" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="0"/>
<startPoint x="-7.920536948419724" y="-0.9900846621428112" z="1.0"/>
</element>
<command name="Line">
<input a0="P" a1="p"/>
<output a0="d"/>
</command>
<element type="line" label="d">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-6.0" y="-8.0" z="48.0"/>
<lineStyle thickness="7" type="15" typeHidden="1"/>
<eqnStyle style="implicit"/>
</element>
<expression label="text6_1" exp=""$\frac{|3\cdot 4+4 \cdot 3+0|}{\sqrt{3^2+4^2}} =\frac{24}{5} $""/>
<element type="text" label="text6_1">
<show object="true" label="false" ev="40"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<bgColor r="255" g="255" b="255" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="0"/>
<startPoint x="-7.931148940011837" y="-5.439028797610263" z="1.0"/>
</element>
<expression label="text2" exp="" " + (LaTeX[P]) + " 到$ " + LaTeX[a] + " x+ " + LaTeX[b] + "y+" + LaTeX[c] + "=0 $的距離"" />
<element type="text" label="text2">
<show object="true" label="false" ev="8"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<bgColor r="255" g="255" b="255" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="false" sizeM="1.0" size="0" style="0"/>
<startPoint x="-7.948066390887957" y="-3.558564322547646" z="1.0"/>
</element>
</construction>
</geogebra>