Lines and Axes

Lines

You can enter a line as a linear equation in x and y or in parametric form into the Input Bar. In both cases previously defined variables (e.g. numbers, points, vectors) can be used within the equation.

You can enter a line’s name at the beginning of the input followed by a colon.

2D

  • Type in g: 3x + 4y = 2 to enter line g as a linear equation.

  • You can enter a line in parametric form thus: g: X = (-5, 5) + t (4, -3)

  • Define the parameters m = 2 and b = -1. Then, you can enter the equation h: y = m*x + b to get a line h in y-intercept-form.

3D

  • You can enter a line in parametric form thus:

    • g: X = (1, 6, 3) + λ (7, -4, 4) ; or via

    • g: Line[(1, 6, 3), Vector[(7, -4, 4)]]

  • You can enter a line as an intersection of 2 planes, by one of the following 3 equivalent input :

    • IntersectPath[4x+7y=46,y+z=9]

    • (4x + 7y = 46, y + z = 9)

    • 7y = 46 - 4x = 7(9 - z)

Axes

The two coordinate axes are available in commands using the names xAxis and yAxis.

The command PerpendicularLine[A, xAxis] constructs the perpendicular line to the x-axis through a given point A.