The unit vector of is:
The angle between two vectors and is found using the dot product formula:
The projection of vector onto vector (denoted ) is given by:
is just a scalar (the component of along the direction of ).
Multiplying back by makes it a vector in the direction of .
Cross Product
1. Cross Product of Two Vectors:
The cross product is a vector operation that produces a vector perpendicular to both input vectors. This operation is only defined for 3D vectors.
The magnitude of the cross product is given by:
where is the angle between vectors and .
The direction is determined by the right-hand rule: curl your fingers from to , and your thumb points in the direction of .
Component Form Computation
If and , then:
Expanding the determinant:
Cross Product of Three Vectors:
This operation is called the vector triple product.
Important Properties
- Non-associative:
- The result lies in the plane of and , not perpendicular like a simple cross product
BAC-CAB Rule
The vector triple product can be computed using the formula:
This formula is commonly remembered as the “BAC-CAB rule” based on the arrangement of vectors in the final expression.
Area of Parallelogram Spanned by and
- Equivalent dot-product form (no cross product needed):
- Scalar triple product :
- The sign indicates the orientation of the vectors. A positive result signifies a right-handed system, while a negative result indicates a left-handed one.
Volume of Parallelepiped Spanned by , ,
This is the absolute value of the scalar triple product.
- If the scalar triple product of three non-zero vectors is zero, the vectors are coplanar
Equivalent Determinant Form
where the columns (or rows) are the vectors.
- The scalar triple product is cyclic:
Gram Matrix
Given vectors , the Gram matrix is
Matrix form: if , then
The squared ‑dimensional volume of the parallelepiped spanned by is
Equivalently,
Properties
- Symmetric: (since )
- Positive semidefinite: All eigenvalues are non-negative
- Rank: = dimension of span of the vectors
of the parallelepiped spanned by .
The Gram determinant formula works in any dimension and for any number of vectors, making it a powerful generalization of cross product-based volume formulas.
If is the matrix with your vectors as columns, then the Gram matrix is:
So is .
- When is square:
- When is rectangular ( with ): is still the square of the product of the singular values of
Therefore:
In 2D
For vectors :
This simplifies to:
In 3D
General Line
Any line in 2D can be written as:
Normal Vector
The normal vector is simply:
because the coefficients are exactly the components perpendicular to the line.
Take any two distinct points on the line, and , so
The vector along the line from to is
Compute the dot product with :
Subtracting the two line equations gives
Thus for every direction vector along the line, so is perpendicular to the line.
The Gradient Explanation
This connects to a profound principle:
Broader principle: This generalizes beautifully to:
- 3D: The normal to plane is
- n-D: The normal to hyperplane is
Direction Vector
A direction vector is any vector perpendicular to . One easy choice:
Slope of a Line
For a line in slope–intercept form
the slope is , where is the angle the line makes with the -axis.
Rewrite as:
So , .
- Normal:
- Direction:
Angle Between Two Lines
For lines with slopes and , the angle between them satisfies
If the lines are perpendicular, then , so is undefined. This occurs exactly when the denominator is zero:
- Vertical line has undefined slope; a perpendicular line is horizontal (slope ).
Planes
The general form of a plane in 3D is:
- Distance from point to plane:
The vector
is perpendicular to the plane.
A direction vector is any vector lying in the plane.
Direction vectors lie in the plane and are therefore orthogonal to the normal:
Equivalently, solve the homogeneous equation
to obtain two independent solutions; these give two independent direction vectors .
Point–normal and parametric forms
-
Point–normal form (given a point on the plane):
-
Parametric form (using two independent direction vectors ):
where is any point on the plane.
-
Projection of a point onto the plane
With signed distance and unit normal ,
Parametric Form Method for Line as Intersection of Two Planes (Point–direction form)
A line in 3D can be described parametrically:
where:
- is a point on the line
- is a direction vector
- is a parameter
Example:
Given the system:
Pick one variable to be free. Common trick: let .
Substituting into the equations:
Write in Vector (Parametric) Form
- Point: is obtained by setting
- Direction vector: comes from the coefficients of
- Any point on the line = base point + scalar multiple of direction vector
Alternative: Direction Vector by Cross Product
The direction vector can also be found directly:
where and are the normal vectors to the two planes.
Skew Lines
Two or more lines are coplanar if there exists a single plane that contains all of them.
Skew lines : non-coplanar
- Intersecting lines: Always coplanar (the intersection point and direction vectors define a unique plane)
- Parallel lines: Always coplanar (they define a unique plane containing both)
- Skew lines: NOT coplanar (neither parallel nor intersecting)
Three vectors are coplanar if their scalar triple product is zero.
Example
Given two lines and in 3D (each defined by intersection of two planes):
For lines defined as intersections of planes:
- : intersection of planes and
- : intersection of planes and
Direction vectors can be found by:
- (cross product of normal vectors to and )
- (cross product of normal vectors to and )
-
Find a point on each line
- on line
- on line
-
Get direction vectors
- for line
- for line
-
Form connecting vector
- (vector from to )
-
Apply scalar triple product test
- Compute:
Distance Between Two Lines in 3D
Suppose we have two lines:
where:
- are points on the lines
- are direction vectors
Case 1: Intersecting Lines
Distance =
Case 2: Parallel Lines
When (i.e., ):
Case 3: Skew Lines
When lines are neither parallel nor intersecting
The shortest distance between two skew lines is the length of the segment that is perpendicular to both lines.
-
is a vector perpendicular to both lines
-
Scalar triple product measures the volume of the parallelepiped spanned by:
- (vector between points)
- (direction of line 1)
- (direction of line 2)
-
Distance = Volume / Base Area:
- Volume =
- Base Area =
- Height (distance) = Volume / Base Area
Geometric Interpretation
A vector perpendicular to both and is:
Take the unit normal:
The connector vector between the lines is:
Project onto . The absolute value of this projection is the perpendicular distance:
Basis of a Vector Space
A basis of a vector space (say ) is a set of vectors that satisfies two conditions:
- Linearly independent — no vector in the set can be written as a linear combination of the others
- Spanning — every vector in the space can be written as a linear combination of those basis vectors
A basis is a minimal, nonredundant set of vectors that can build every vector in the space uniquely. It provides coordinates, encodes the dimension.
The standard basis in is:
-
It aligns with the usual x- and y-axes in the plane
-
When we write a vector in , we really mean:
-
By default, all coordinates are taken relative to unless stated otherwise
Any vector can be written as:
So is a basis of .
Non-uniqueness of bases: for instance,
also form a basis because the matrix has nonzero determinant:
A basis doesn’t have to be the standard one. For example:
This is still a valid basis of , but now the “axes” of your coordinate system are tilted and stretched.
A basis provides the “axes” of your coordinate system. Coordinates change with the basis, but the geometric vector does not.
The number of vectors in a basis = the dimension of the space.
Given vectors and :
- Determinant test (square case): is a basis.
- Rank test: is a basis.
- RREF test: If the RREF of is , then is a basis.
Suppose you have a vector .
In the Standard Basis
If , this means:
In Another Basis
The same vector can also be written as:
where are the coordinates of in basis .
- A vector’s coordinates depend on the basis chosen — it may look different in and , but it’s the same vector in
Change of Basis Matrix
- In the standard basis , the vector means
- In another basis, say , the same has different coordinates :
“changing basis” means: expressing the same vector in the language of a different basis.
Suppose is a basis of .
Form the basis matrix:
Key Relationships
-
If are the coordinates of in basis , then the actual vector in standard coordinates is:
-
Conversely, to recover the coordinates in basis :
From One Basis to Another
Suppose we want to go from coordinates in to coordinates in .
Derivation
We have:
and since :
- The matrix
is the change-of-basis matrix from to .
So once you compute , you can convert any coordinates in directly into coordinates in .