I have a representation of a linear equation in standard form (ax+by+c=0) which I am representing as

Odompombagnom6ng

Odompombagnom6ng

Answered question

2022-02-24

I have a representation of a linear equation in standard form (ax+by+c=0) which I am representing as a set of coefficients: a,b,c.
I want to normalize these so that any two equations that represent the same line can be compared programatically to see if they're equal just using the co-efficients. For this I need the co-efficients of any two equations representing the same line to be equivalent after normalizing.
I normalized the values by dividing all coefficients by a2+b2+c2 which scales the coefficients to be the same but I don't know how to account for sign changes in this.
For example, if I have equations: 2x+-4y+2=0 (represented as 2, -4, 2) and -2x+4y+-2=0 (represented as -2, 4, -2), how can I transform the coefficients to make them equal?

Answer & Explanation

emeriinb4r

emeriinb4r

Beginner2022-02-25Added 10 answers

This is the same problem as standardizing projective homogeneous coordinates. You have the right first step, namely, dividing all coordinates by the magnitude. Now you have the problem that a set of coordinates and its negative are equivalent. If the last non zero coordinate is negative, then negate all the coordinates. This gives standardized coordinates.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?