First time here? Check out the FAQ!

Ask Your Question
1

How can I solve line equation in SageMath?

asked 5 years ago

andrewyg gravatar image

So we know we got standard 2D line equation that looks like y=a*x+b. And now I want to solve the a,b by given a few points. How can I achieve it?

I remember I've seen the solution somewhere, but I just can't find it out now.

Preview: (hide)

Comments

Homework ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 5 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 5 years ago

tmonteil gravatar image

updated 5 years ago

Let me just restate your question in a way that makes the answer obvious : if (x_0, y_0) and (x_1, y_1) are two of the few given points, you want to solve the system of equations y_0==a*x_0+b and y_1==a*x_1+b, where a and b are the unknown.

Preview: (hide)
link

Comments

The "given a few points" proposition is a red flag...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 5 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 5 years ago

Seen: 379 times

Last updated: Aug 27 '19