Line

Author

Eric W. Weisstein
January 4, 2023

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PlaneGeometry/Line.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Line.html.

©2023 Wolfram Research, Inc. except for portions noted otherwise

Definition

eqn=(x/a)+(y/b)-1;

Figure

Manipulate[ContourPlot[(x/a)+(y/b)==1,{x,-2,2},{y,-2,2},Axes->True,Frame->None,Epilog->{PointSize[.02],Red,Point[{0,b}],Blue,Point[{a,0}]}],{{a,2},-2,2},{{b,1},-2,2}]

Equation

(x/a)+(y/b)==1

Numerator[Together[eqn]]

Solve[eqn==0,y]

Thread[{x,y}=={a t,b(1-t)}]

GroebnerBasis[%,{x,y},t]

A x+B y+C==0

Solve[a x+b y+c==0,y]

Thread[{x,y}=={b  t,-(c/b+a t)}]

GroebnerBasis[%,{x,y},t]

Thread[{x,y}=={b  t,-(c/b+a  t)}]

GroebnerBasis[%,{x,y},t]

Polar

FullSimplify[#.#&[{b t,-(c/b+a t)}]]

Solve[Tan[q]==((-(c/b+a t))/(b t)),t]

FullSimplify[(Sqrt[(b^2) (t^2)+((((c+a b t))^2)/(b^2))/.t->(c/(-a b-(b^2) Tan[q]))]),c∈Reals]

With[{a=1,b=1,c=0},Plot[Abs[c] (Sqrt[(1/(((a Cos[q]+b Sin[q]))^2))]),{q,0,2π}]]

With[{a=2,b=-1,c=1},PolarPlot[Abs[c] (Sqrt[(1/(((a Cos[q]+b Sin[q]))^2))]),{q,0,2π}]]

With[{a=2,b=-1,c=1},Plot[-c Sec[q-ArcTan[a,b]],{q,0,2π}]]

FullSimplify[TrigExpand[Sec[q-ArcTan[b/a]]]]

With[{a=1,b=1,c=0},{
ContourPlot[a x+b y+c==0,{x,-1,.25},{y,-1,1.5},Frame->False,Axes->True,AspectRatio->Automatic],
ParametricPlot[{b t,-(c/b+a t)},{t,-.3,1},AspectRatio->Automatic],
PolarPlot[((-c)/(a Cos[q]+b Sin[q])),{q,1.4,3.9}],
PolarPlot[-(c/(Sqrt[(a^2)+(b^2)])) Sec[q-ArcTan[b/a]],{q,1.4,3.8}]
}]

With[{a=2,b=-1,c=1},{
ContourPlot[a x+b y+c==0,{x,-1,.25},{y,-1,1.5},Frame->False,Axes->True,AspectRatio->Automatic],
ParametricPlot[{b t,-(c/b+a t)},{t,-.3,1},AspectRatio->Automatic],
PolarPlot[((-c)/(a Cos[q]+b Sin[q])),{q,1.4,3.9}],
PolarPlot[-(c/(Sqrt[(a^2)+(b^2)])) Sec[q-ArcTan[b/a]],{q,1.4,3.8}]
}]

With[{a=0,b=-1,c=1},{
ContourPlot[a x+b y+c==0,{x,-1,.25},{y,-1,1.5},Frame->False,Axes->True,AspectRatio->Automatic],
ParametricPlot[{b t,-(c/b+a t)},{t,-.3,1},AspectRatio->Automatic],
PolarPlot[((-c)/(a Cos[q]+b Sin[q])),{q,1.4,3.9}],
PolarPlot[-(c/(Sqrt[(a^2)+(b^2)])) Sec[q-ArcTan[b/a]],{q,1.4,3.8}]
}]

With[{a=0,b=-1,c=-1},{
ContourPlot[a x+b y+c==0,{x,-1,.25},{y,-1.1,1.5},Frame->False,Axes->True,AspectRatio->Automatic],
ParametricPlot[{b t,-(c/b+a t)},{t,-.3,1},AspectRatio->Automatic],
PolarPlot[((-c)/(a Cos[q]+b Sin[q])),{q,1.4,3.9}],
PolarPlot[-(c/(Sqrt[(a^2)+(b^2)])) Sec[q-ArcTan[b/a]],{q,1.4,3.8}]
}]

Plot

parms={{1,1,0},{1,-1,0},{1,0,0},{0,1,0},{1,2,0},{2,-1,0}};

Function[{a,b,c},ContourPlot[a x+b y+c==0,{x,-1,1},{y,-1,1},PlotRange->1]]@@@parms

Function[{a,b,c},ParametricPlot[{b  t,-(c/b+a t)},{t,-1,1},PlotRange->1]]@@@parms

Properties

line={b  t,-(c/b+a t)};

Arc Length Function

ArcLength[line,t]

Curvature

Parametric

Curvature[line,t]

Polar

FullSimplify[Curvature[-c/(a Cos[q]+b Sin[q]),q],q∈Reals]

Implicit

ImplicitCurvature[a x+b y+c,{x,y}]

Slope

Slope[{b t,-(c/b+a t)},t]

Slope[-c/(a Cos[q]+b Sin[q]),q]//FullSimplify

Slope[a x+b y+c==0,{x,y}]

Tangential Angle

TangentialAngle[a x+b y+c,t]

Vector Properties

parm={b t,-(c/b+a t)};
assum=(a|b|c|t)∈Reals&&b=!=0;
xform=Abs[x_]^(n_/;Mod[n,2]==0):>x^n;

VectorLength

Assuming[assum,FullSimplify[Norm[parm]]]/.xform

NormalVector

Assuming[assum,FullSimplify[NormalVector[parm,t]]]/.xform

TangentVector

Assuming[assum,FullSimplify[TangentVector[parm,t]]]/.xform