Vector & Scalar Product Solver
Understanding Vector & Scalar Products
Use
Complex Numbers |
Polar Coordinates
This tool allows you to explore fundamental operations on vectors, including scalar (dot) products and vector (cross) products, along with related concepts like direction cosines and the vector equation of a line.
Vectors are quantities that have both magnitude and direction, often represented in 3D Cartesian coordinates using the unit triad $\mathbf{i}, \mathbf{j}, \mathbf{k}$.
Unit Triad ($\mathbf{i}, \mathbf{j}, \mathbf{k}$)
In three-dimensional Cartesian coordinates, we use a set of three mutually perpendicular unit vectors called the unit triad:
- $\mathbf{i}$ is the unit vector in the positive x-direction: $\mathbf{i} = (1, 0, 0)$.
- $\mathbf{j}$ is the unit vector in the positive y-direction: $\mathbf{j} = (0, 1, 0)$.
- $\mathbf{k}$ is the unit vector in the positive z-direction: $\mathbf{k} = (0, 0, 1)$.
Any vector $\mathbf{V}$ in 3D space can be expressed as a linear combination of these unit vectors:
$$ \mathbf{V} = V_x\mathbf{i} + V_y\mathbf{j} + V_z\mathbf{k} $$Where $V_x, V_y,$ and $V_z$ are the scalar components of $\mathbf{V}$ along the x, y, and z axes, respectively. This is equivalent to the component form $\mathbf{V} = (V_x, V_y, V_z)$.
Properties:
- $|\mathbf{i}| = |\mathbf{j}| = |\mathbf{k}| = 1$
- They are mutually orthogonal (perpendicular): $\mathbf{i} \cdot \mathbf{j} = \mathbf{j} \cdot \mathbf{k} = \mathbf{k} \cdot \mathbf{i} = 0$
- Dot products with themselves: $\mathbf{i} \cdot \mathbf{i} = \mathbf{j} \cdot \mathbf{j} = \mathbf{k} \cdot \mathbf{k} = 1$
Scalar (Dot) Product
The scalar product (or dot product) of two vectors $\mathbf{A}$ and $\mathbf{B}$ is a scalar quantity defined as:
$$ \mathbf{A} \cdot \mathbf{B} = |\mathbf{A}| |\mathbf{B}| \cos \theta $$where $\theta$ is the angle between the two vectors ($0 \le \theta \le \pi$).
In component form, if $\mathbf{A} = A_x\mathbf{i} + A_y\mathbf{j} + A_z\mathbf{k}$ and $\mathbf{B} = B_x\mathbf{i} + B_y\mathbf{j} + B_z\mathbf{k}$, the dot product is calculated as:
$$ \mathbf{A} \cdot \mathbf{B} = A_x B_x + A_y B_y + A_z B_z $$Properties:
- Commutative: $\mathbf{A} \cdot \mathbf{B} = \mathbf{B} \cdot \mathbf{A}$
- Distributive: $\mathbf{A} \cdot (\mathbf{B} + \mathbf{C}) = \mathbf{A} \cdot \mathbf{B} + \mathbf{A} \cdot \mathbf{C}$
- $\mathbf{A} \cdot \mathbf{A} = |\mathbf{A}|^2$
- If $\mathbf{A} \cdot \mathbf{B} = 0$ (and $\mathbf{A}, \mathbf{B}$ are non-zero), then $\mathbf{A}$ and $\mathbf{B}$ are orthogonal (perpendicular).
Calculate $\mathbf{A} \cdot \mathbf{B}$
Vector A
Vector B
Angle Between Two Vectors
The angle $\theta$ between two non-zero vectors $\mathbf{A}$ and $\mathbf{B}$ can be found using the definition of the scalar product:
$$ \mathbf{A} \cdot \mathbf{B} = |\mathbf{A}| |\mathbf{B}| \cos \theta $$Rearranging gives:
$$ \cos \theta = \frac{\mathbf{A} \cdot \mathbf{B}}{|\mathbf{A}| |\mathbf{B}|} $$Therefore, the angle $\theta$ is:
$$ \theta = \arccos \left( \frac{\mathbf{A} \cdot \mathbf{B}}{|\mathbf{A}| |\mathbf{B}|} \right) $$Remember that $|\mathbf{A}| = \sqrt{A_x^2 + A_y^2 + A_z^2}$ and $|\mathbf{B}| = \sqrt{B_x^2 + B_y^2 + B_z^2}$.
Calculate Angle $\theta$ between $\mathbf{A}$ and $\mathbf{B}$
Vector A
Vector B
Direction Cosines
The direction cosines of a vector $\mathbf{V} = V_x\mathbf{i} + V_y\mathbf{j} + V_z\mathbf{k}$ are the cosines of the angles between the vector and the positive coordinate axes.
Let $\alpha, \beta,$ and $\gamma$ be the angles that $\mathbf{V}$ makes with the positive x, y, and z axes, respectively. Then the direction cosines are:
- $l = \cos \alpha = \frac{V_x}{|\mathbf{V}|}$
- $m = \cos \beta = \frac{V_y}{|\mathbf{V}|}$
- $n = \cos \gamma = \frac{V_z}{|\mathbf{V}|}$
Where $|\mathbf{V}| = \sqrt{V_x^2 + V_y^2 + V_z^2}$ is the magnitude of the vector.
An important property is that the sum of the squares of the direction cosines is always equal to 1:
$$ l^2 + m^2 + n^2 = \cos^2 \alpha + \cos^2 \beta + \cos^2 \gamma = 1 $$A unit vector in the direction of $\mathbf{V}$ can be written using the direction cosines: $\mathbf{\hat{v}} = l\mathbf{i} + m\mathbf{j} + n\mathbf{k}$.
Calculate Direction Cosines of Vector $\mathbf{V}$
Vector V
Applications of the Scalar Product
The scalar product has several important applications in physics and engineering:
- Work Done: If a constant force $\mathbf{F}$ moves an object through a displacement $\mathbf{d}$, the work done $W$ by the force is $W = \mathbf{F} \cdot \mathbf{d} = |\mathbf{F}| |\mathbf{d}| \cos \theta$.
- Projection of a Vector: The scalar projection of vector $\mathbf{A}$ onto vector $\mathbf{B}$ is given by $\text{comp}_{\mathbf{B}}\mathbf{A} = \frac{\mathbf{A} \cdot \mathbf{B}}{|\mathbf{B}|} = |\mathbf{A}| \cos \theta$. The vector projection is $(\text{comp}_{\mathbf{B}}\mathbf{A}) \frac{\mathbf{B}}{|\mathbf{B}|}$.
- Power: The instantaneous power $P$ delivered by a force $\mathbf{F}$ acting on an object moving with velocity $\mathbf{v}$ is $P = \mathbf{F} \cdot \mathbf{v}$.
- Checking Orthogonality: As mentioned, if $\mathbf{A} \cdot \mathbf{B} = 0$, the vectors are perpendicular.
Vector (Cross) Product
The vector product (or cross product) of two vectors $\mathbf{A}$ and $\mathbf{B}$ is a vector quantity, denoted $\mathbf{A} \times \mathbf{B}$, defined as follows:
- Magnitude: $|\mathbf{A} \times \mathbf{B}| = |\mathbf{A}| |\mathbf{B}| \sin \theta$, where $\theta$ is the angle between $\mathbf{A}$ and $\mathbf{B}$ ($0 \le \theta \le \pi$).
- Direction: The direction of $\mathbf{A} \times \mathbf{B}$ is perpendicular to the plane containing $\mathbf{A}$ and $\mathbf{B}$, determined by the right-hand rule (point fingers of right hand along $\mathbf{A}$, curl towards $\mathbf{B}$, thumb points in direction of $\mathbf{A} \times \mathbf{B}$).
In component form, using the determinant notation:
$$ \mathbf{A} \times \mathbf{B} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ A_x & A_y & A_z \\ B_x & B_y & B_z \end{vmatrix} = (A_y B_z - A_z B_y)\mathbf{i} - (A_x B_z - A_z B_x)\mathbf{j} + (A_x B_y - A_y B_x)\mathbf{k} $$Properties:
- Anti-commutative: $\mathbf{A} \times \mathbf{B} = -(\mathbf{B} \times \mathbf{A})$
- Distributive: $\mathbf{A} \times (\mathbf{B} + \mathbf{C}) = (\mathbf{A} \times \mathbf{B}) + (\mathbf{A} \times \mathbf{C})$
- $\mathbf{A} \times \mathbf{A} = \mathbf{0}$ (the zero vector)
- If $\mathbf{A} \times \mathbf{B} = \mathbf{0}$ (and $\mathbf{A}, \mathbf{B}$ are non-zero), then $\mathbf{A}$ and $\mathbf{B}$ are parallel or anti-parallel ($\theta = 0$ or $\theta = \pi$).
- $\mathbf{i} \times \mathbf{j} = \mathbf{k}$, $\mathbf{j} \times \mathbf{k} = \mathbf{i}$, $\mathbf{k} \times \mathbf{i} = \mathbf{j}$
- $\mathbf{j} \times \mathbf{i} = -\mathbf{k}$, $\mathbf{k} \times \mathbf{j} = -\mathbf{i}$, $\mathbf{i} \times \mathbf{k} = -\mathbf{j}$
Calculate $\mathbf{A} \times \mathbf{B}$
Vector A
Vector B
Applications of the Vector Product
The vector product is crucial in many areas of physics and geometry:
- Torque (Moment of a Force): The torque $\boldsymbol{\tau}$ produced by a force $\mathbf{F}$ acting at a position $\mathbf{r}$ relative to a pivot point is $\boldsymbol{\tau} = \mathbf{r} \times \mathbf{F}$.
- Area of a Parallelogram: The magnitude of the cross product, $|\mathbf{A} \times \mathbf{B}|$, is equal to the area of the parallelogram formed by vectors $\mathbf{A}$ and $\mathbf{B}$ when placed tail-to-tail.
- Angular Momentum: The angular momentum $\mathbf{L}$ of a particle with linear momentum $\mathbf{p}$ at position $\mathbf{r}$ relative to an origin is $\mathbf{L} = \mathbf{r} \times \mathbf{p}$.
- Magnetic Force: The force $\mathbf{F}_B$ on a charge $q$ moving with velocity $\mathbf{v}$ in a magnetic field $\mathbf{B}$ is given by the Lorentz force equation: $\mathbf{F}_B = q(\mathbf{v} \times \mathbf{B})$.
- Finding a Normal Vector: The cross product $\mathbf{A} \times \mathbf{B}$ gives a vector that is normal (perpendicular) to the plane containing $\mathbf{A}$ and $\mathbf{B}$.
Vector Equation of a Line
A line in 3D space can be defined by a point it passes through and a direction vector parallel to the line.
Let $\mathbf{r}_0$ be the position vector of a known point $P_0$ on the line, and let $\mathbf{v}$ be a vector parallel to the line (the direction vector).
The position vector $\mathbf{r}$ of any point $P$ on the line can be expressed as:
$$ \mathbf{r} = \mathbf{r}_0 + t\mathbf{v} $$where $t$ is a scalar parameter. As $t$ varies over all real numbers, the point $P$ traces out the entire line.
If $\mathbf{r} = (x, y, z)$, $\mathbf{r}_0 = (x_0, y_0, z_0)$, and $\mathbf{v} = (a, b, c)$, the vector equation can be written in parametric form:
- $x = x_0 + ta$
- $y = y_0 + tb$
- $z = z_0 + tc$
If $a, b, c$ are all non-zero, we can also write the symmetric equations:
$$ \frac{x - x_0}{a} = \frac{y - y_0}{b} = \frac{z - z_0}{c} (= t) $$