Equation of line
y = mx + c or ax + by + c = 0 ?
Let's keep in mind that any line or plane in any dimension can be represented using below equation:
f = w1x1 + w2x2 +... + wnxn + w0
Where, w1, w2, ..., wn are coefficients of an object in a particular dimension. Which are represented as a, b, c in regular notation.
and x1, x2, ..., xn are dimensions that are represented as x, y, z in regular notation.
Let's try to get the equation of the below line, (Beautifully plotted using GeoGebra)
- ax + by + c = 0 or w1x1 + w2x2 + w0 = 0
x +2y -5 =0 - y = mx + c
y = -0.5x + 2.5
which is better?
ax + by + c = 0 is always better than y = mx + c. Because it is a generalized form to represent a line or plan in any dimension. We can easily calculate slope or intercept with any axis or even normal vector using values of a, b, c.
X intercept = -c/a
Y intercept = -c/b
slope wrt x = -a/b
normal vector w =[a,b]
丄distance from origin = c/|w|
line
f = w1x1 + w2x2 +... + wnxn + w0
x1 intercept = -w0 / w1
x2 intercept = -w0 / w2
.
.
xn intercept = -w0 / wn
normal vector w = [w1, w2, ..., wn]
丄distance from origin = -w0 / |w|, where |w| =
Comments
Post a Comment