Student[LinearAlgebra]
LinearSystemPlot
plot a system of 2-D or 3-D linear equations
Calling Sequence
Parameters
Description
Examples
LinearSystemPlot(sys, vars, opts)
LinearSystemPlot(M, v, opts)
LinearSystemPlot(AM, opts)
sys
-
list or set of linear equations or algebraic expressions
vars
(optional) list or set specifying the variable names
M
Matrix
v
Vector
AM
augmented Matrix
opts
plotting options or equation(s) of the form option=value where option is one of caption, colors, lineoptions, planeoptions, or Student plot options; specify options for the plot
The LinearSystemPlot(sys) command plots lines or planes associated with the given system of linear equations.
If the system of linear equations has a unique solution, a circle is plotted at the solution.
A system of linear equations can be given as a set or list of linear equations, the Matrix M and Vector v in the linear system M·x=v, or the augmented Matrix AM=M|v.
The names of the independent variables can be given as an optional argument vars. If this option is not given and the variable names can be determined from the linear system, the determined variables are used. Otherwise the variables x and y are used.
Note: If the system of equations specifies fewer variables than the intended dimensionality, use the vars parameter. For example, to plot the x-y plane in 3-space, use LinearSystemPlot({z=0},[x,y,z]).
The opts argument can contain any of the Student plot options or any of the following equations that set plot options.
caption = anything
A caption for the plot. The default caption is A system of linear equations. For more information about specifying a caption, see plot/typesetting.
colors = list(algebraic)
A list of colors for the lines or planes. For more information on plot colors, see plot/color.
lineoptions = list
A list of options for the plot of the lines for a system of two unknowns. For more information on plot options, see plot/options. [Default: solid lines]
planeoptions = list
A list of options for the plot of the planes for a system of three unknowns. For more information on plot options, see plot/options. [Default: solid planes]
The commands to create the plots from the Plotting Guide are
with⁡StudentLinearAlgebra:
infolevelStudentLinearAlgebra≔1:
sys≔x+2⁢y=1,x−y=2
sys≔x−y=2,x+2⁢y=1
LinearSystemPlot⁡sys
The solution is the point <1.667, -.3333>
LinearSystemPlot⁡sys,x,y,z,orientation=60,60
The solution is the line <1.667, -.3333, 0.> + t * <0., 0., 1.>
Other examples:
M≔1,2,3,4|3,3,1,2|5,3,2,5:
v≔3,3,3,4:
LinearSystemPlot⁡M,v
No solution exists
AM≔1,1,0,0|0,1,1,0|0,0,0,1|1,2,3,4:
LinearSystemPlot⁡AM
See Also
plot/color
plot/options
plot/typesetting
solve
Student plot options
Student[LinearAlgebra][GaussianElimination]
Student[LinearAlgebra][GaussianEliminationTutor]
Student[LinearAlgebra][GaussJordanEliminationTutor]
Student[LinearAlgebra][LinearSolve]
Student[LinearAlgebra][LinearSolveTutor]
Download Help Document