Math Calculators, Lessons and Formulas

It is time to solve your math problem

mathportal.org

Vector calculator

google play badge app store badge

This calculator performs all vector operations in two- and three-dimensional space. You can add, subtract, find length, find vector projections, and find the dot and cross product of two vectors. For each operation, the calculator writes a step-by-step, easy-to-understand explanation of how the work has been done.

Tutorial

What is a vector?

A vector is a mathematical object that cannot be described by a single number; instead, it must be characterized by its magnitude (length) and direction.

In this tutorial, we'll learn how to calculate the magnitude, dot and cross product and angle between two vectors in the coordinate plane and space.

1 : Magnitude

The magnitude is the length of a vector. The formula for the magnitude of a vector V=(v1, v2) is:

$$ \| \vec{v} \| = \sqrt{v_1^2 + v_2^2 } $$

Example 01: Find the magnitude of the vector V=(4, 2).

In this example we have v1 = 4 and v2 = 2 so the magnitude is:

vector magnitude in coordinate plane
$$ \| \vec{v} \| = \sqrt{v_1^2 + v_2^2} = \sqrt{4^2 + 2 ^2} = \\ = \sqrt{20} = 2\sqrt{5} $$

Example 02: Find the magnitude of a vector V=(2/3, √3, 2).

Solution

2 : Sum and difference

The following video shows how to perform vector addition in two dimensions.

Vector visualisation (created with Manim)

3 : Dot product

The formula for the dot product of vectors v = (v1, v2) and w = (w1, w2) is

v·w = v1·w1 + v2·w2

Two vectors are orthogonal to each other if their dot product is equal to zero.

Example 03: Calculate the dot product of V=(4, 1) and W=(-1, 5). Check if the vectors are mutually orthogonal.

To find the dot product, we use the above formula:

$$ \begin{aligned} \vec{v} \cdot \vec{w} &= \left(4, 1 \right) \cdot \left(-1, 5 \right) = \\[1 em] &= 4 \cdot (-1) + 1 \cdot 5 = -4 + 5 = 1 \end{aligned} $$
dot product of two vectors in coordinate plane

Since the dot product is not equal to zero, we can conclude that the vectors ARE NOT orthogonal.

Example 04: Find the dot product of the vectors V1=(1/2, √3, 5) and V2=(4, -√3, 10).

Solution

4 : Angle between two vectors

To find the angle α between vectors $ \vec{a} $ and $ \vec{b} $, we use the following formula:

$$ \cos \alpha = \dfrac{\vec{a} \cdot \vec{b}}{ \|\vec{a}\| \, \|\vec{b}\|} $$

Note that $ \vec{a} \cdot \vec{b} $ is a dot product while $\|\vec{a}\|$ and $\|\vec{b}\|$ are magnitudes of vectors $ \vec{a} $ and $ \vec{b}$.

Example 05: Find the angle between vectors a=(4, 3) and b=(-2, 2).

First we will find the dot product and magnitudes:

$$ \begin{aligned} \vec{a} \cdot \vec{b} &= ( 4, 3) \cdot (-2, 2) = 4 \cdot (-2) + 3 \cdot 2 = -2 \\[1 em] \| \vec{a} \| &= \sqrt{4^2 + 3^2} = \sqrt{16 + 9} = \sqrt{25} = 5 \\[1 em] \| \vec{b} \| &= \sqrt{(-2)^2 + 2^2} = \sqrt{4 + 4} = \sqrt{8} \end{aligned} $$

Now we'll find the cos(α):

$$ \cos \alpha = \dfrac{\vec{a} \cdot \vec{b}}{ \|\vec{a}\| \, \|\vec{b}\|} = \dfrac{-2}{5 \sqrt{8}} \approx -0.1414 $$

The angle α is:

$$ \alpha = \cos^{-1}(-0.1414) \approx 98^{o} $$
angle between two vectors in coordinate plane

Example 06: Find the angle between vectors V1=(2,1,-4) and V2=(3,-5,2).

Solution

5 : Cross product

The cross product of vectors V=(v1, v2, v3) and W=(w1, w2, w3) is given by the formula:

V×W =(v2w3-v3w2, v3w1-v1w3, v1w2-v2w1)

Note that the cross product requires both vectors to be three-dimensional.

If the two vectors are parallel than the cross product is equal zero.

Example 07: Find the cross products of the vectors V=(-2,3,1) and W=(4,-6,-2). Check if the vectors are parallel.

We'll find cross product using above formula

V × W =
=(3·(-2)-1·(-6),1·4-(-2)·(-2),-2·(-6)-3·4)=
=(0, 0, 0)

Since the cross product is zero, we conclude that the vectors are parallel.

Example 08: Find the cross products of the vectors V1=(4,2,-3/2) and V2=(1/2, 0, 2).

Solution

Vectors in two dimensions
operations on two-dimensional vectors with steps
help ↓↓ examples ↓↓
V1(1,-3) V2(5,1/2)
V1(√2,-1/3) V2(√5,0)
Magnitude (length) of V1
V1 · V2 ( dot product )
V1 + V2 V1 - V2
Angle between V1 and V2
Check if V1 and V2 are linearly dependent
Find projection of V1 onto V2
Find approximate solution
Hide steps
thumb_up 1.8K thumb_down

Get Widget Code

Vectors in three dimensions
operations on three-dimensional vectors with steps
help ↓↓ examples ↓↓
V1=(1,-√3,3/2) V2=(√2, 1, 2/3)
Magnitude (length) of V1
V1 · V2 ( dot product ) V1 ✕ V2 ( cross product )
V1 + V2 V1 - V2
Angle between V1 and V2
Check if V1, V2 and V3 are linearly dependent
Find projection of V1 onto V2
Find approximate solution
Hide steps
Examples
ex 1:
What are the coordinates of the midpoint of the line segment AB with endpoints (-4, 8) and (-2, 3)?
ex 2:
Given vector V1=(8,-4), calculate the magnitude.
ex 3:
Calculate the dot product of vectors V1=(-1/4,2/5) and V2=(-5,-5/4)
ex 4:
Find the angle between the vectors V1=(3,5,-7) and V2=(-3,4,-2).
ex 5:
Determine if the following set of vectors is linearly independent: v1=(3,-2,4), v2=(1,-2,3) and V3=(3,2,-1)
ex 6:
Find the cross product of V1=(-2,2/3,-3) and V2=(4,0,-1/2).
Find more worked-out examples in our database of solved problems.
452 861 664 solved problems
working...
×
ans:
syntax error
C
DEL
ANS
±
(
)
÷
×
7
8
9
4
5
6
+
1
2
3
=
0
.