Line - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Student[Precalculus]

  

Line

  

compute a line

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Line(u, v, opts)

Parameters

u

-

algebraic expression, list, or Vector

v

-

algebraic expression, list, or Vector

opts

-

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

Description

• 

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:

  

 

  

 

  

caption = anything

  

A caption for the plot.

  

The default caption is constructed from the parameters and the command options. caption = "" disables the default caption. For more information about specifying a caption, see plot/typesetting.

  

 

  

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.

Examples

withStudentPrecalculus:

Line1,2

y=x+2,−1,2,2

(1)

Line1,1,121

y=x2+32

(2)

Line1,12,4,1

y=x6+13,16,13,−2

(3)

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

Line1,2,output=plot,lineoptions=color=Green

See Also

Student[Precalculus]

Student[Precalculus][ComputationOverview]

Student[Precalculus][LineTutor]