Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.12.0
Vectors
Basic Operations
- Addition: $\vec{a} + \vec{b} = (a_1+b_1, a_2+b_2, a_3+b_3)$
- Scalar multiplication: $k\vec{a} = (ka_1, ka_2, ka_3)$
- Magnitude: $|\vec{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}$
- Unit vector: $\hat{a} = \frac{\vec{a}}{|\vec{a}|}$
Dot Product (Scalar Product)
$\vec{a} \cdot \vec{b} = a_1b_1 + a_2b_2 + a_3b_3 = |\vec{a}||\vec{b}|\cos\theta$
Properties:
- Commutative: $\vec{a} \cdot \vec{b} = \vec{b} \cdot \vec{a}$
- $\vec{a} \cdot \vec{a} = |\vec{a}|^2$
- $\vec{a} \perp \vec{b} \iff \vec{a} \cdot \vec{b} = 0$
Cross Product (Vector Product)
$\vec{a} \times \vec{b} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \ a_1 & a_2 & a_3 \ b_1 & b_2 & b_3 \end{vmatrix}$
$|\vec{a} \times \vec{b}| = |\vec{a}||\vec{b}|\sin\theta$
Properties:
- Anti-commutative: $\vec{a} \times \vec{b} = -(\vec{b} \times \vec{a})$
- $\vec{a} \parallel \vec{b} \iff \vec{a} \times \vec{b} = \vec{0}$
- $|\vec{a} \times \vec{b}|$ = area of parallelogram
Scalar Triple Product
$[\vec{a}, \vec{b}, \vec{c}] = \vec{a} \cdot (\vec{b} \times \vec{c})$
- Volume of parallelepiped = $|[\vec{a}, \vec{b}, \vec{c}]|$
- Coplanar vectors: $[\vec{a}, \vec{b}, \vec{c}] = 0$
Projection
Projection of $\vec{a}$ onto $\vec{b}$: $\text{proj}_{\vec{b}} \vec{a} = \frac{\vec{a} \cdot \vec{b}}{|\vec{b}|^2} \vec{b}$
Scalar projection: $\frac{\vec{a} \cdot \vec{b}}{|\vec{b}|}$
Section Formula
Point dividing $A$ and $B$ in ratio $m:n$: $\vec{r} = \frac{m\vec{b} + n\vec{a}}{m+n}$