My Digital Garden

Cartesian coordinates

Cartesian coordinates

Basics

Cartesian plane denoted \R2

Axes and Quadrants

x−axis={(x,y)∈\R2:y=0}y−axis={(x,y)∈\R2:x=0}first quadrant={(x,y)∈\R2:x>0,y>0}second quadrant={(x,y)∈\R2:x<0,y>0}third quadrant={(x,y)∈\R2:x<0,y<0}fourth quadrant={(x,y)∈\R2:x>0,y<0}

Calculating distance

Pythagoras

z=x2+y2

Distance formula

Given three points:

A=(xa,ya)B=(xb,yb)C=(xc,yc)dist(A,B)=(xa−xb)2+(ya−yb)2dist(A,C)=(xa−xc)2+(ya−yc)2

Clustering

If A and B are in Cluster I
and C is in Cluster II

Then

dist(A,B)<<dist(A,C)

Lines

Slope of line segment

Given
A=(a,b)
B=(c,d)

SlopeofAB→=m=d−bc−a

Basic line formula

y−y0=m(x−x0) "Point-slope" form
y=mx+b "slope-intercept" form

Given a line that passes through (2,1) and (3,2), i.e. a slope of 1,
for any point (x,y) to be on the line, the slope from (2,1) to (x,y) must be 1

1=y−1x−2

rearranging...

y−1=1(x−2)

so a definition of the line is:

ℓ={(x,y)∈\R2:y−1=1(x−2)}

Point-slope formula for line

Above generalises to

If a line ℓ has slope m, and if (x0,y0) is any point on ℓ, then ℓ has the equation:

y−y0=m(x−x0)

Slope-intercept formula for line

Considering same line defined as

ℓ={(x,y)∈\R2:y−1=1(x−2)}

This line intercepts the y-axis at a point (0,b) i.e.

b−1=1(0−2)b=−1

Substituting this intercept point back into the Point-Intercept formula:

y−(−1)=1(x−0)y+1=xy=1x−1

This generalises into the Slope-Intercept formula for the line:

If ℓ has slope m, and ℓ hits the y-axis at (0,b), then

y=mx+b

is an equation for ℓ, where m is the slope and b is the y-intercept.

Based on course material by Paul Bendich and Daniel Egger from Data Science Maths Skills