compute a line - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Education : Student Package : Precalculus : Computation : Student/Precalculus/Line

Student[Precalculus][Line] - compute a line

Calling Sequence

Line(u, v, opts)




algebraic expression, list, or Vector



algebraic expression, list, or Vector



(optional) equation(s) of the form option = value where option is one of lineoptions, output, pointoptions, title, and view; specify output options



The Line(u, v) command computes the equation of the line, its slope, and the y- and x-intercepts from the data specified by u and v.  These values are returned in the form of an expression sequence; therefore, Line(1,2)[1] will obtain the equation of the line with slope 1 and y-intercept 2.


If u and v are both algebraic expressions then u is taken as the slope and v as the y-intercept of the line.


If one of u or v is an algebraic expression and the other is either a list of 2 algebraic values or a 2-D Vector with algebraic components, the algebraic expression is the slope and the list or Vector specifies a point on the line.


If u and v are both 2-element lists or 2-D Vectors with algebraic components then they are taken as points on the line. In this case, u and v must specify different points.


The Line(u, v, output = plot) command displays the graph of the line.


The optional parameters opts specify the desired output options for the resulting plot when output = plot. The available options are:




lineoptions = list


Specifies the plot options for the line.




output = value or plot


This options controls the return value of the function.


* output = value computes the equation of the line, its slope, and the y- and x-intercepts.  The default is output=value.


* output = plot displays a plot.  The data parameters u and v must be constant values when specifying this value.




pointoptions = list containing plot options for points on the line


Specifies the plot options for the points on the line.




title = string


Specifies the title to be displayed on the plot.




view = list


Specifies the x- and y-range of the plot.




For information on including additional plot option(s), see the plot help page.


For information on how to change the default colors, see the Student [SetColors] help page.












Plot the line with slope -1 and y-intercept 2.


See Also

Student[Precalculus], Student[Precalculus][ComputationOverview], Student[Precalculus][LineTutor]

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam