## Coordinates

### 2D Cartesian Coordinates

A point in the plane is represented as

#### Distance Between Two Points in 2D

Given two points

### Polar Coordinates (2D)

In the polar coordinate system, a point in the plane is represented as

is the distance from the origin to the point (also known as radius or modulus). is the angle between the positive axis and the line connecting the origin to the point, measured counterclockwise (in radians or degrees).

#### Conversion Formulas Between Polar and Cartesian:

From polar to Cartesian:

From Cartesian to polar:

### 3D Cartesian Coordinates

A point in three-dimensional space is represented as

### Cylindrical Coordinates

Cylindrical coordinates are an extension of polar coordinates in three dimensions. A point in this system is expressed as

is the distance from the axis to the point (the radius in the plane). is the angle in the plane relative to the positive axis. is the height of the point above the plane (the same as in Cartesian coordinates).

#### Conversion Formulas Between Cylindrical and Cartesian:

From cylindrical to Cartesian:

From Cartesian to cylindrical:

### Spherical Coordinates

Spherical coordinates are used to describe points in three-dimensional space using three values:

is the distance from the origin to the point (also known as radius or modulus). is the angle in the plane measured from the positive axis (similar to the polar angle in cylindrical coordinates). is the angle between the positive axis and the line connecting the origin to the point (called the inclination angle or colatitude).

#### Conversion Formulas Between Spherical and Cartesian:

From spherical to Cartesian:

From Cartesian to spherical:

### Homogeneous Coordinates

In computer graphics, homogeneous coordinates are used to handle projection transformations more efficiently.

#### 2D Homogeneous

A point in homogeneous coordinates is represented as

#### 3D Homogeneous

A point in 3D homogeneous is represented as

## Points and Distances

#### Distance Between Two Points

The distance

#### Midpoint

The midpoint

#### Length of a Segment

The length of a segment in three-dimensional space between points

## 2D Lines

#### Line Equation

The line equation in slope-intercept form is:

Where:

is the slope. is the -intercept.

#### General Line Equation

The general form of the line equation is:

where:

#### Slope of the Line

The slope

#### Line Equation Given Its Slope and a Point

If the slope

#### Equation Given by Two Points

The equation of a line in two dimensions given by two points

#### Parallel Lines

Two lines are parallel if they have the same slope,

#### Perpendicular Lines

Two lines are perpendicular if the product of their slopes is -1:

#### Angle Between Two Lines

If the slopes of two lines are

#### Distance from a Point to a Line (2D)

For a point

#### Distance Between Two Parallel Lines

For parallel lines