Question: Plotting Linear System of Equations

Hello, everyone,

I am new to Maple and I am trying to get use of it.

I tried to plot the following linear systems in different ways. I realized that the Student Linear Algebra is not as flexible as Linear Algebra. My question is the following. Is there any other way to create a plot without defining the implicit plots?

with(Student[LinearAlgebra])

A := Matrix([[1, 1], [12, 16]]); b := Vector([10, 136]); sol := LinearSolve(A, b)

Matrix(2, 2, {(1, 1) = 1, (1, 2) = 1, (2, 1) = 12, (2, 2) = 16})

 

Vector(2, {(1) = 10, (2) = 136})

 

Vector[column](%id = 36893488153382714652)

(1)

LinearSystemPlot({x+y = 10, 12*x+16*y = 136}, axes = normal)

 

restart

 

 

with(Student[LinearAlgebra])

A := Matrix([[2, -1, 1], [0, 1, 3], [0, 0, 1]]); b := Vector([-5, 7, 2]); sol := LinearSolve(A, b)

Matrix(3, 3, {(1, 1) = 2, (1, 2) = -1, (1, 3) = 1, (2, 1) = 0, (2, 2) = 1, (2, 3) = 3, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1})

 

Vector(3, {(1) = -5, (2) = 7, (3) = 2})

 

LinearSolve(Matrix(%id = 36893488151878044716), Vector[column](%id = 36893488151878030628))

(2)

LinearSystemPlot({w = 2, y+3*w = 7, 2*x-y+w = -5}, axes = normal)

 

restart

with(plots); with(LinearAlgebra); A := Matrix([[1, 1], [12, 16]]); b := Vector([10, 136]); sol := LinearSolve(A, b); eq1 := x+y = 10; eq2 := 12*x+16*y = 136; plot1 := implicitplot(eq1, x = -5 .. 10, y = -50 .. 50, color = "red", thickness = 2, labels = ["x", "y"]); plot2 := implicitplot(eq2, x = -5 .. 10, y = -50 .. 50, color = "blue", thickness = 2); display(plot1, plot2, title = "Plot of Linear System", legend = [x+y = 10, 12*x+16*y = 136])

Matrix(2, 2, {(1, 1) = 1, (1, 2) = 1, (2, 1) = 12, (2, 2) = 16})

 

Vector(2, {(1) = 10, (2) = 136})

 

Vector[column](%id = 36893488153330030820)

 

x+y = 10

 

12*x+16*y = 136

 

 

A := Matrix([[2, -1, 1], [0, 1, 3], [0, 0, 1]]); b := Vector([-5, 7, 2]); solution := LinearSolve(A, b); eq1 := 2*x-y+z = -5; eq2 := y+3*z = 7; eq3 := z = 2; plot1 := implicitplot3d(eq1, x = -10 .. 10, y = -10 .. 10, z = -10 .. 10, color = "red", style = surface); plot2 := implicitplot3d(eq2, x = -10 .. 10, y = -10 .. 10, z = -10 .. 10, color = "blue", style = surface); plot3 := implicitplot3d(eq3, x = -10 .. 10, y = -10 .. 10, z = -10 .. 10, color = "green", style = surface); display(plot1, plot2, plot3, title = "3D Plot of Linear System", axes = boxed)

Matrix(3, 3, {(1, 1) = 2, (1, 2) = -1, (1, 3) = 1, (2, 1) = 0, (2, 2) = 1, (2, 3) = 3, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1})

 

Vector(3, {(1) = -5, (2) = 7, (3) = 2})

 

Vector[column](%id = 36893488152610632156)

 

 

NULL


 

Download linear_systems.mw

 

Please Wait...