The general equation and the normal form · Mathematics… | StemPy Lab
Course 6.2·Lesson 1 of 3
The general equation and the normal form
Every straight line has an equation Ax+By+C=0
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
One equation for every line
In the first course you wrote a line as y=mx+c, or by its intercepts. Each form misses some lines. A vertical line such as x=5 has no slope. A line through the origin has no intercept form.
The general equation covers every line:
Ax+By+C=0,A and B not both 0.
Line
A
B
C
3x+4y=12
3
4
−12
the vertical line x=5
1
0
−5
the horizontal line y=−3
0
1
3
the line y=2x through the origin
2
−1
0
Multiply A, B and C by the same non-zero number and the line does not change. The equations 6x+8y−24=0 and 3x+4y−12=0 are the same line. Only the ratio A:B:C matters, which is why two facts are enough to fix a line.
Reading the equation
Put y=0 to find where the line cuts the x-axis. Put x=0 to find where it cuts the y-axis. Solve for y to read the slope.
The x-intercept is −AC, when A=0.
The y-intercept is −BC, when B=0.
The slope is −BA, when B=0.
Example. For 3x+4y−12=0, the slope is −43, the x-intercept is 4 and the y-intercept is 3.
Three cases need care.
If B=0, the line is vertical, x=−AC, and it has no slope.
If A=0, the line is horizontal, y=−BC, and its slope is 0.
If C=0, the line passes through the origin, and both intercepts are 0.
Parallel and perpendicular lines
Lines with the same A and B and different C are parallel. So every line parallel to Ax+By+C=0 has the form Ax+By+k=0.
A line perpendicular to Ax+By+C=0 has the form Bx−Ay+k=0. The slopes are −BA and AB, and their product is −1.
Two lines A1x+B1y+C1=0 and A2x+B2y+C2=0 are
parallel when A1B2=A2B1,
perpendicular when A1A2+B1B2=0.
Example 1. Find the line through (3,2) parallel to 4x−3y+5=0.
Step 1. Keep A and B. The line is 4x−3y+k=0.
Step 2. Use the point.12−6+k=0, so k=−6.
Answer:4x−3y−6=0.
Example 2. Find the line through (2,1) perpendicular to 2x+5y−7=0.
Step 1. Swap and change one sign. The line is 5x−2y+k=0.
Step 2. Use the point.10−2+k=0, so k=−8.
Answer:5x−2y−8=0.
Set C=0 and watch the red segment shrink to nothing: a line through the origin is at distance 0 from it.
The normal form
Drop the perpendicular from the origin to the line. Let its length be p, which is never negative. Let α be the angle it makes with the positive x-axis, measured from 0∘ up to 360∘.
A coordinate grid with the line 3x + 4y - 12 = 0 drawn in blue. It crosses the x-axis at (4, 0) and the y-axis at (0, 3). A red segment runs from the origin to the line and meets it at right angles at a red dot near (1.44, 1.92). The segment is labelled p = 2.4. A green arc at the origin marks the angle alpha = 53.13 degrees between the x-axis and the red segment. The title says cos alpha = 3/5, sin alpha = 4/5 and p = 12/5.
The foot of the perpendicular is the point (pcosα,psinα). A point (x,y) is on the line exactly when its shadow on the direction (cosα,sinα) has length p. That gives the normal form:
xcosα+ysinα=p.
Reducing Ax+By+C=0 to the normal form
Step 1. Move the constant. Write Ax+By=−C.
Step 2. Make the right side positive. If −C is negative, multiply the whole equation by −1.
Step 3. Divide by A2+B2. The coefficients of x and y become cosα and sinα, and the right side is p.
Example 1.3x+4y−12=0. Write 3x+4y=12. The right side is positive, and 9+16=5. So
53x+54y=512.
Here cosα=0.6, sinα=0.8 and p=2.4. Both are positive, so α is in the first quadrant, and α=53.13∘.
Example 2.x−y+4=0. Write x−y=−4. The right side is negative, so multiply by −1: −x+y=4. Divide by 2:
−21x+21y=24=22.
Here cosα=−21 and sinα=21. The cosine is negative and the sine positive, so α=135∘. And p=22≈2.83.
Example 3. The vertical line x=5 is already in normal form with α=0∘ and p=5. The horizontal line y=−3 becomes −y=3, so α=270∘ and p=3.
Always check the signs of cosα and sinα together. The value of tanα alone cannot tell the second quadrant from the fourth.
Practise with new numbers
Try it in Python
The program reads the slope and the intercepts as exact fractions, finds the normal form, and checks a point of the line against it.
Common mistakes
Reading the slope as BA. Moving Ax across changes its sign, so the slope is −BA.
Using the intercept form for a line through the origin. Both intercepts are 0, and ax+by=1 cannot describe it.
Looking for the slope of a vertical line. When B=0 the line has no slope.
Leaving the right side negative in the normal form. The number p is a distance, so it must be positive.
Taking α from tanα alone. Use the signs of cosα and sinα to place the angle.
Remember these
Every line is Ax+By+C=0 with A and B not both 0.
Slope −BA, x-intercept −AC, y-intercept −BC.
Parallel to the line: Ax+By+k=0. Perpendicular to the line: Bx−Ay+k=0.
Normal form: xcosα+ysinα=p, with p≥0.
To reduce, write Ax+By=−C, make the right side positive, and divide by A2+B2.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Find the slope of the line 2x+6y−9=0.
Find the intercepts of 5x−4y+20=0.
Find the line through (1,4) parallel to 3x−y+2=0.
Are 2x+3y−5=0 and 6x−4y+1=0 perpendicular?
Find the distance p of 5x+12y−26=0 from the origin.
Enroll free in General Form, Distances and Families of Lines
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.