# Vector Calculator

Perform an operation on one or more vectors using our vector calculator below.

Vector a
Vector b
Vector a
Vector b

## Result:

### Steps to Solve

Learn how we calculated this below

## How to Use the Vector Calculator

You can calculate the dot product, cross product, or projection of vectors, calculate the angle between vectors, or add and subtract vectors using the calculator above. You can do this by entering the coordinates of each vector and selecting the operation you want to perform.

Follow along, and we’ll go through how to perform each vector operation.

## How to Calculate the Cross Product

The cross product is the product between two vectors a and b in a three-dimensional space and is denoted a × b.

### Cross Product Formula

Calculate the cross product of two vectors using the following formula:

a × b = ({yazb – zayb}, -{xazb – zaxb}, {xay2 – yaxb})

Substitute the values of two vectors for xa, ya, za, xb, yb, & zb to solve the resulting vector.

## How to Calculate the Dot Product

The dot product is the sum of the products of each component of two vectors, a and b. Unlike the cross product, the dot product is a single number and is denoted a · b.

### Dot Product Formula

Calculate the dot product of two vectors using the following formula:

a · b = (xa · xb) + (ya · yb) + (za · zb)

Substitute the values of two vectors for xa, ya, za, xb, yb, & zb to solve the dot product.

You can add two or more vectors by adding the corresponding components together to find the resultant vector.

Add two vectors using the following formula:

a + b = ({xa + xb}, {ya + yb}, {za + zb})

Thus, vector a + b is equal to the sum of the x coordinates of each vector, the sum of the y coordinates of each vector, and the sum of the z coordinates of each vector.

## How to Subtract Vectors

You can subtract a vector by subtracting the corresponding components from one another to find the resultant vector.

### Vector Subtraction Formula

Subtract one vector from another using the following formula:

a – b = ({xa – xb}, {ya – yb}, {za – zb})

Thus, vector a – b is equal to the difference of the x coordinates of each vector, the difference of the y coordinates of each vector, and the difference of the z coordinates of each vector.

## How to Find the Angle Between Two Vectors

Taken by aligning the initial point, the angle between vectors is the shortest angle between them. It’s the angle formed at the intersection of the initial points, or tails of each vector.

### Angle Between Two Vectors Formula

Calculate the angle between two vectors using the following formula:

θ = cos-1((a · b) / (|a| · |b|))

Thus, the angle θ between the two vectors a and b is equal to the inverse cosine of the dot product a · b divided by the magnitude of vector a |a| times the magnitude of vector b |b|.

## How to Project a Vector

To determine how much of one vector goes in the direction of another vector, you can use vector projection, which is denoted projba.

### Vector Projection Formula

Calculate the projection of one vector onto another using the following formula:

projba = a · b|b|²b

Thus, the projection of vector a onto b is equal to the dot product a · b divided by the magnitude of vector b squared, times each component of vector b.

## How to Find the Magnitude

The magnitude is the vector’s size, or length. You might say it’s the distance between the vector’s initial point and endpoint.

The magnitude of a vector a is denoted |a|. A magnitude is always a positive number, it cannot be negative. You can find the midpoint of a two-dimensional vector using our midpoint calculator.

### Vector Magnitude Formula

Calculate the magnitude of a vector using the following formula:

|a|= x² + y² + z²

The magnitude |a| of vector a is equal to the square root of the sum of the square of each of the vector’s components x, y, and z.

## How to Find the Unit Vector

A unit vector is a vector with a magnitude, of 1. To scale a vector to a unit vector, reduce its length to 1 without changing its direction using the unit vector formula.

### Unit Vector Formula

Calculate the unit vector of a vector using the following formula:

û = u / |u|

So, the unit vector û of vector u is equal to each component of vector u divided by its magnitude |u|.