2.直線方程式

A(3,1)

P(x,y)

一般而言，\;通過點A(x_0,y_0)且斜率為m的
\直線L，\;可設P(x,y)為直線上異於A的任一\
點，\;那麼\frac{y-y_0}{x-x_0}的比值就是斜率m，\;我們
\可以推出直線L的方程式為\\fgcolor{yellow}{L:y-y_0=m(x-x_0)}
\這樣的式子我們稱為直線的\fgcolor{yellow}{點斜式}。

點斜式
\坐標平面上過點A(x_0,y_0)且斜率為m的直
\線方程式為：\;L:\;y-y_0=m(x-x_0)

A(x_0,y_0)

求下列直線方程式：
\(1)\;過點(-4,5)，且斜率為\;-\frac{2}{3}
\(2)\;過點(0,2)，\;且斜率為3

(-4,5)

(0,2)

A(x_1,y_1)

B(x_2,y_2)

範例
\求下列各直線方程式
\(1)\;過點(4,5),(4,2)
\(2)\;過點(0,2),(1,5)

(4,5)

(4,2)

(0,2)

(1,5)

∵直線L的斜率為\frac{y_2-y_1}{x_2-x_1}
\\;\;\;由點斜式知L的方程式為
\\;\;\;\;y-y_1=\frac{y_2-y_1}{x_2-x_1}×(x-x_1)

(3)\;斜截式

定義
\若直線L的斜率為m，\;且y截距為k，
\(即直線L與y軸相交於點(0,k))
\則L的方程式為：\;y=mx+k

練習
\求下列各直線方程式：
\(1)\;斜率為3，\;且\;y\;截距為2
\(2)\;斜率為-\frac{5}{6}，\;且\;y\;截距為-\frac{7}{3}

(0,k)

(0,2)

(0,-\frac{7}{3})

(4)\;截距式

若直線L的x截距與y截距分別為a,b，\;(直線
\L分別與x軸,y軸交於(a,0)與(0,b)兩點)，
\ab≠0，\;則直線L的方程式為\frac{x}{a}+\frac{y}{b}=1

練習
\求下列各直線方程式
\(1)\;x\;截距為-3且\;y\;截距為4
\(2)\;x\;截距為\frac{1}{2}且\;y\;截距為\frac{1}{3}

(a,0)

(0,b)

(-3,0)

(0,4)

練習
\試將直線的一般式2x+3y=6運用直
\線的多重表徵來表示。

求滿足下列條件的直線方程式
\(1)\;過點A(4,3)且斜率為-\frac{1}{2}
\(2)\;過A(-2,6),B(8,4)兩點
\(3)\;斜率為3，\;y截距為-1
\(4)\;x截距為5，\;y截距為-2

A(2,0)

B(0,4)

A(4,3)

A(-2,6)

B(8,4)

(5,0)

(0,-2)

x

y

Forward

例題
\已知坐標平面上一直線L，\;P(-2,4)在L上，
\若L在第二象限與兩坐標軸所圍之三角形面
\積為16，\;試求L之方程式。

P(-2,4)

已知O為原點，\;點P(2,3)在直線L上，\;且L與
\兩坐標軸正向交於A,B兩點，\;則當\Delta OAB
\面積有最小值時，\;試求直線L的方程式。

P(2,3)

$m$

A

B

B = (16.22, -8.04)
W: (floor(x(B)), floor(y(B)))
list = Sequence(Sequence[W + (h, k), h, 1, 18], k, 1, 13)
A = Corner(4)
s = 0 (slider from 0 to 123, step 1)
poly1, a_0, a_1, a_3, a_4 = Polygon(B, B + (18, 0), B + (18, 12), B + (0, 12))
C = PointIn(poly1)
O_1 = DynamicCoordinates(C, floor(x(C)), floor(y(C)))
u = Vector((x(B), y(O_1)), (x(B) + 18, y(O_1)))
v = Vector((x(O_1), y(B)), (x(O_1), y(B) + 12))
D_A: O_1 + (3, 1)
α = 0 rad (slider from 0 to 6.283185307179586, step 0.1*°)
L_1: y - y(D_A) = (tan(α) * (x - x(D_A)))
k = -20 (slider from -20 to 20, step 0.01)
L_2: y - y(D_A) = (0.5 * (x - x(D_A))) + k
L_3: y - y(O_1) - 1 = (0.5 * (x - x(O_1) - 3))
D_B = Point(L_3)
D_C: O_1 + (4, 3)
L_4: y - y(D_C) = (1 / 3 * (x - x(D_C)))
D_D: O_1 + ((-4), 5)
L_5: y - y(D_D) = (((-2)) / 3 * (x - x(D_D)))
text12: "解：\\" + (LaTeX[If[s ≟ 12, "(1)\;由點斜式知，L之方程式為： \\\;\;\;\;\;\;\;y-5=-\frac{2}{3}(x+4) \\\;\;\;\;\;\;\;⇒2x+3y-7=0"]]) + "" + (LaTeX[If[s ≟ 13, "(2)\;由點斜式知，L之方程式為：\\ \;\;\;\;\;\;\;y-2=3(x-0) \\\;\;\;\;\;\;\;⇒y=3x+2"]]) + ""
D_E: O_1 + (0, 2)
L_6: y - y(D_E) = (3 * (x - x(D_E)))
text14: "(2)\;兩點式
\\" + (LaTeX[If[s ≥ 15, "在坐標平面上兩點可決定唯一的一條直線"]]) + ""
text16: "兩點式\\
已知直線上有相異兩點A(x_1,y_1),B(x_2,y_2)，
\\則：
\\" + (LaTeX[If[s ≥ 17, "(1)\;若x_1=x_2，\;則直線L的方程式為：\;x=x_1"]]) + "
\\" + (LaTeX[If[s ≥ 18, "(2)\;若x_1≠x_2，\;則直線L的方程式為：\; \\\;\;\;\;\;\;\;\frac{y-y_1}{x-x_1}=\frac{y_2-y_1}{x_2-x_1}"]]) + ""
D = (18.04, -1.54)
E = (24.64, 0.52)
E_D = Point(list)
E_E = Point(list)
L_7 = Line(E_D, E_E)
L_8: x = x(O_1) + 4
E_A: O_1 + (0, 2)
E_B: O_1 + (1, 5)
E_1: O_1 + (4, 5)
E_2: O_1 + (4, 2)
text20_1: "解
\\" + (LaTeX[If[s ≟ 22, "(1)\;因為這兩點的x坐標相同，\;故直線方程\\\;\;\;\;\;\;式為x=4"]]) + "" + (LaTeX[If[s ≥ 23, "(2)\;由兩點式知\frac{y-2}{x-0}=\frac{5-2}{1-0}"]]) + "" + (LaTeX[If[s ≟ 24, "\\\;\;\;\;\;\;⇒3x-y+2=0"]]) + ""
L_9 = Line(E_A, E_B)
text25: "(3)\;斜截式
\\" + (LaTeX[If[s ≥ 26, "一般而言，\;直線也有其他的表達方式；"]]) + "
\\" + (LaTeX[If[s ≥ 27, "例如：\;已知直線L的斜率為m且L與y軸交於 \\點(0,k)，\;此時可稱直線L的y截距為k。"]]) + "
\\" + (LaTeX[If[s ≥ 28, "由於該直線斜率為m且通過點(0,k)，\;故可 \\由點斜式：\;y-k=m(x-0)整理得："]]) + "
\\" + (LaTeX[If[s ≥ 29, "y=mx+k，\;我們通稱此種直線方程式為 \\斜截式。"]]) + ""
text32: "解" + (LaTeX[If[s ≟ 33, "\\(1)\;由斜截式知直線方程式為\;y=3x+2"]]) + "
\\" + (LaTeX[If[s ≥ 34, "(2)\;由斜截式知直線方程式為 \\\;\;\;\;\;\;y=-\frac{5}{6}x-\frac{7}{3}"]]) + "
\\" + (LaTeX[If[s ≥ 35, "\;\;\;\;\;\;⇒6y=-5x-14"]]) + "
\\" + (LaTeX[If[s ≥ 36, "\;\;\;\;\;\;⇒5x+6y+14=0"]]) + ""
E_C: O_1 + (0, 4)
L_{10}: y - y(E_C) = ((-2) * (x - x(E_C)))
L_{11}: y - y(O_1) = (3 * (x - x(O_1))) + 2
E_F: O_1 + (0, 2)
E_G: O_1 + (0, ((-7)) / 3)
L_{12}: y - y(O_1) = (((-5)) / 6 * (x - x(O_1))) - 7 / 3
text49: "解
\\" + (LaTeX[If[s ≟ 50 ∨ s ≟ 51, "(1)\;由截距式知L：\frac{x}{-3}+\frac{y}{4}=1"]]) + "
\\" + (LaTeX[If[s ≟ 51, "\;\;\;\;\;\;⇒4x-3y+12=0"]]) + "
\\" + (LaTeX[If[s ≟ 52 ∨ s ≟ 53, "(2)\;由截距式知L：\frac{x}{\frac{1}{2}}+\frac{y}{\frac{1}{3}}=1"]]) + "" + (LaTeX[If[s ≟ 53, "\\\;\;\;\;\;\;⇒2x+3y=1"]]) + ""
E_3: O_1 + (6, 0)
E_4: O_1 + (0, 3)
L_{13} = Line(E_3, E_4)
text37: "(4)\;截距式" + (LaTeX[If[(s ≥ 38) ∧ (s ≤ 41), "\\一般而言，\;若直線L與x軸交於A(a,0)， \\與y軸交於B(0,b)，\;"]]) + "" + (LaTeX[If[(s ≥ 39) ∧ (s ≤ 41), "則稱a為L的x截距， \\b為L的y截距。"]]) + "" + (LaTeX[If[(s ≥ 40) ∧ (s ≤ 41), "\\例如\\直線L_1:2x-3y=6的x截距為3， \\y截距為-2；"]]) + "" + (LaTeX[If[s ≟ 41, "\\直線L_2:y+2=0沒有x截距，\;y截距為 \\-2。"]]) + "
\\" + (LaTeX[If[s ≥ 42, "若直線L的x截距與y截距分別為a與b，\;即\\ 直線L分別交x軸與y軸於(a,0),(0,b)兩點， \\ab≠0。\;"]]) + "" + (LaTeX[If[s ≥ 43, "則由兩點式可得 \\L：\frac{y-0}{x-a}=\frac{b-0}{0-a}"]]) + "" + (LaTeX[If[s ≥ 44, "⇒-ay=bx-ab"]]) + "" + (LaTeX[If[s ≥ 45, "\\⇒bx+ay=ab"]]) + "" + (LaTeX[If[s ≥ 46, "⇒\frac{x}{a}+\frac{y}{b}=1"]]) + ""
E_5: O_1 + (3, 0)
E_6: O_1 + (0, (-2))
L_{14} = Line(E_5, E_6)
L_{15}: y = y(O_1) - 2
E_7: O_1 + ((-3), 0)
E_8: O_1 + (0, 4)
L_{16} = Line(E_7, E_8)
E_9: O_1 + (0.5, 0)
E_a: O_1 + (0, 1 / 3)
L_{17} = Line(E_9, E_a)
text54: "游泳
\\" + (LaTeX[If[s ≟ 55, "蛙式"]]) + "" + (LaTeX[If[s ≟ 56, "自由式"]]) + "" + (LaTeX[If[s ≟ 57, "蝶式"]]) + "" + (LaTeX[If[s ≟ 58, "仰式"]]) + "" + (LaTeX[If[s ≟ 59, "狗爬式"]]) + ""
F: A + (3, (-10))
G: F + (8, 0)
text60: "直線方程式
\\" + (LaTeX[If[s ≥ 61, "點斜式\;y-y_0=m(x-x_0)"]]) + "
\\" + (LaTeX[If[s ≥ 62, "兩點式\;\frac{y-y_1}{x-x_1}=\frac{y_2-y_1}{x_2-x_1}"]]) + "
\\" + (LaTeX[If[s ≥ 63, "斜截式\;y=mx+k"]]) + "
\\" + (LaTeX[If[s ≟ 64, "截距式\;\frac{x}{a}+\frac{y}{b}=1"]]) + ""
text73: "總之，\;直線L的方程式都可以表為一般式
\\ax+by+c=0，\;其中a,b不全為0。\;" + (LaTeX[If[s ≥ 74, "反之， \\一方程式若形如ax+by+c=0的形式且 \\a,b不全為0時，\;我們可以就b值加以討論。"]]) + "
\\" + (LaTeX[If[s ≥ 75, "(1)\;b≠0時：\;方程式化為y=-\frac{a}{b}x-\frac{c}{b}"]]) + "
\\" + (LaTeX[If[s ≥ 76, "\;\;\;\;\;\;由斜截式知，\;圖形是斜率為-\frac{a}{b}且過 \\\;\;\;\;\;\;點(0,-\frac{c}{b})的直線"]]) + "
\\" + (LaTeX[If[s ≥ 77, "(2)\;b=0時：\;⇒a≠0\;方程式化為x=-\frac{c}{a} \\\;\;\;\;\;\;故圖形為通過點(-\frac{c}{a},0)的鉛直線。"]]) + ""
text79: "斜截式：\;" + (LaTeX[If[s ≥ 80, "3y=-2x+6"]]) + "" + (LaTeX[If[s ≥ 81, "⇒y=-\frac{2}{3}x+2"]]) + "
\\" + (LaTeX[If[s ≥ 82, "截距式：\;"]]) + "" + (LaTeX[If[s ≥ 83, "\frac{2x}{6}+\frac{3y}{6}=1"]]) + "" + (LaTeX[If[s ≥ 84, "⇒\frac{x}{3}+\frac{y}{2}=1"]]) + ""
text86: "(1)\;考慮點斜式\;y-3=-\frac{1}{2}(x-4)
\\" + (LaTeX[If[s ≥ 87, "\;\;\;\;\;\;⇒2y-6=-x+4"]]) + "
\\" + (LaTeX[If[s ≥ 88, "\;\;\;\;\;\;⇒x+2y-10=0"]]) + ""
text89: "(2)\;考慮兩點式\;\frac{y-6}{x-(-2)}=\frac{4-6}{8-(-2)}
\\" + (LaTeX[If[s ≥ 90, "\;\;\;\;\;\;⇒5y-30=-x-2"]]) + "
\\" + (LaTeX[If[s ≟ 91, "\;\;\;\;\;\;⇒x+5y-32=0"]]) + ""
text92: "(3)\;由斜截式\;y=3x-1
\\" + (LaTeX[If[s ≟ 93, "\;\;\;\;\;\;⇒3x-y-1=0"]]) + ""
text94: "(4)\;截距式\;\frac{x}{5}+\frac{y}{-2}=1
\\" + (LaTeX[If[s ≟ 95, "\;\;\;\;\;\;⇒2x-5y-10=0"]]) + ""
text96: "討論
\\本題的四小題中，\;依序為點斜式，\;兩點式，
\\斜截式與截距式。\;" + (LaTeX[If[s ≥ 97, "\\事實上在求直線方程式時，\;我們可以活用 \\這些公式，\;例如求過兩點的直線方程式時，\; \\我們可以可以先求出斜率再用點斜式，\; \\當然也可以直接用兩點式。"]]) + ""
F_1: O_1 + (2, 0)
F_2: O_1 + (0, 4)
L_{18} = Line(F_1, F_2)
P_1 = Point(list)
P_2 = Point(list)
L_{19} = Line(P_1, P_2)
L_{20}: (2 * (x - x(O_1))) + (3 * (y - y(O_1))) = 6
F_3: O_1 + (4, 3)
L_{21}: x - x(O_1) + (2 * (y - y(O_1))) = 10
F_4: O_1 + ((-2), 6)
F_5: O_1 + (8, 4)
L_{22} = Line(F_4, F_5)
L_{23}: (3 * (x - x(O_1))) - (y - y(O_1)) = 1
F_6: O_1 + (5, 0)
F_7: O_1 + (0, (-2))
L_{24} = Line(F_6, F_7)
text1: "(1)\;點斜式\\" + (LaTeX[If[(s ≥ 2) ∧ (s ≤ 4), "在坐標平面上過定點A(3,1)的直線有很\\多條，可以繞著A點旋轉。"]]) + "
\\" + (LaTeX[If[(s ≥ 3) ∧ (s ≤ 4), "斜率為\frac{1}{2}的直線也很多條，\;它們彼此\\平行。"]]) + "
\\" + (LaTeX[If[s ≟ 4, "但是通過A(3,1)且斜率為\frac{1}{2}的直線只\\有唯一的一條。"]]) + "
\\" + (LaTeX[If[s ≥ 5, "平面上通過點A(3,1)的直線有很多條，\\其中斜率為\frac{1}{2}的直線L方程式要如何求\\出呢？"]]) + "
\\" + (LaTeX[If[s ≥ 6, "設P(x,y)為直線L上異於A(3,1)的一點，\\那麼\frac{y-1}{x-3}的比值就是斜率\frac{1}{2}。"]]) + "
\\" + (LaTeX[If[s ≥ 7, "即\frac{y-1}{x-3}＝\frac{1}{2}，\;整理可得\;y-1=\frac{1}{2}(x-3)"]]) + "
\\" + (LaTeX[If[s ≥ 8, "而A(3,1)亦滿足此方程式，\;故L的方程式為\\y-1=\frac{1}{2}(x-3)"]]) + ""
text99: "" + (LaTeX[If[(s ≥ 99) ∧ (s ≤ 103), "設L:\frac{x}{a}+\frac{y}{b}=1，\;且a<0,b>0"]]) + "
\\" + (LaTeX[If[(s ≥ 100) ∧ (s ≤ 103), "因為P(-2,4)在L上，\;所以\frac{-2}{a}+\frac{4}{b}=1"]]) + "
\\" + (LaTeX[If[(s ≥ 101) ∧ (s ≤ 103), "⇒-2b+4a=ab"]]) + "
\\" + (LaTeX[If[s ≟ 102 ∨ s ≟ 103, "又三角形的面積為\frac{1}{2}|ab|=16"]]) + "
\\" + (LaTeX[If[s ≟ 103, "⇒-ab=32"]]) + "
\\" + (LaTeX[If[(s ≥ 104) ∧ (s ≤ 110), "\left\{ ab=4a-2b\\ab=-32 \right.\"]]) + " " + (LaTeX[If[(s ≥ 105) ∧ (s ≤ 110), "⇒32+4a+\frac{64}{a}=0"]]) + "
\\" + (LaTeX[If[(s ≥ 106) ∧ (s ≤ 110), "⇒a^2+8a+16=0"]]) + "" + (LaTeX[If[(s ≥ 107) ∧ (s ≤ 110), "⇒(a+4)^2=0"]]) + "
\\" + (LaTeX[If[(s ≥ 108) ∧ (s ≤ 110), "⇒a=-4,b=8"]]) + "" + (LaTeX[If[(s ≥ 109) ∧ (s ≤ 110), "⇒L:\frac{x}{-4}+\frac{y}{8}=1"]]) + "
\\" + (LaTeX[If[s ≟ 110, "⇒2x-y+8=0"]]) + ""
F_8: O_1 + ((-2), 4)
L_{25}: (2 * (x - x(O_1))) - (y - y(O_1)) + 8 = 0
P_3: O_1 + (2, 3)
β = 2.1624629432209743 rad (slider from 112*° to 170*°, step 0.1*°)
L_{26}: y - y(P_3) = (tan(β) * (x - x(P_3)))
P_4 = Intersect(L_{26}, y = y(O_1))
P_5 = Intersect(L_{26}, x = x(O_1))
poly_{111}, p_5, o_1, p_4 = Polygon(O_1, P_4, P_5)
text45: "" + (LaTeX[poly_{111}]) + ""
H = (-1.58, -8.98)
J = (14.640000000000008, -6.76)
K = (10.460000000000004, -6.76)
L = (10.860000000000005, -6.76)
M = (3.8600000000000025, -6.76)
text112: "\\" + (LaTeX[If[(s ≥ 112) ∧ (s ≤ 119), "設L:\frac{x}{a}+\frac{y}{b}=1,a>0,b>0"]]) + "
\\" + (LaTeX[If[(s ≥ 113) ∧ (s ≤ 119), "又P在L上∴\frac{2}{a}+\frac{3}{b}=1"]]) + "" + (LaTeX[If[(s ≥ 114) ∧ (s ≤ 119), "⇒2b+3a=ab"]]) + "
\\" + (LaTeX[If[(s ≥ 115) ∧ (s ≤ 119), "由算幾不等式知：\;\frac{2b+3a}{2}≥\sqrt{2a·3b}"]]) + "
\\" + (LaTeX[If[(s ≥ 116) ∧ (s ≤ 119), "⇒\frac{ab}{2}≥\sqrt{6ab}"]]) + "" + (LaTeX[If[(s ≥ 117) ∧ (s ≤ 119), "⇒\frac{a^2b^2}{4}≥6ab"]]) + "" + (LaTeX[If[s ≟ 118 ∨ s ≟ 119, "⇒ab≥24"]]) + "
\\" + (LaTeX[If[s ≟ 119, "又\Delta OAB的面積為\frac{1}{2}|ab|=\frac{1}{2}ab≥12"]]) + "
\\" + (LaTeX[If[s ≥ 120, "∵\frac{2}{a}=\frac{3}{b}且\frac{2}{a}+\frac{3}{b}=1⇒\frac{2}{a}=\frac{3}{b}=\frac{1}{2}"]]) + "
\\" + (LaTeX[If[s ≥ 121, "故當a=4,b=6時\Delta OAB面積有最小值12"]]) + "
\\" + (LaTeX[If[s ≥ 122, "此時L的方程式為：\;\frac{x}{4}+\frac{y}{6}=1"]]) + "
\\" + (LaTeX[If[s ≟ 123, "⇒3x+2y=12"]]) + ""
N = (15.400000000000006, -6.76)
I: H + (16, 0)
text65: "例如
\\求通過A(2,0),B(0,4)兩點的直線方程式。
\\ " + (LaTeX[If[s ≥ 66, "\fgcolor{yellow}{點斜式}；\;考慮斜率m=\frac{4-0}{0-2}=-2"]]) + "
\\" + (LaTeX[If[s ≥ 67, "再考慮過A點，\;得：\;y-0=-2(x-2)"]]) + "
\\" + (LaTeX[If[s ≥ 68, "⇒2x+y-4=0"]]) + "
\\" + (LaTeX[If[s ≥ 69, "\fgcolor{yellow}{斜截式}：\;若考慮斜率m=-2與通過B點"]]) + "
\\" + (LaTeX[If[s ≥ 70, "⇒y=-2x+4⇒2x+y=4"]]) + "
\\" + (LaTeX[If[s ≥ 71, "\fgcolor{yellow}{兩點式}：\;\frac{y-0}{x-2}=\frac{4-0}{0-2}⇒2x+y-4=0"]]) + "
\\" + (LaTeX[If[s ≟ 72, "\fgcolor{yellow}{截距式}：\;\frac{x}{2}+\frac{y}{4}=1⇒2x+y-4=0"]]) + ""