vectors.md (1041B)
1 # Vectors 2 3 A vector is an object that has both **magnitude** (length) and **direction** and 4 is often represented as an ordered list of numbers, like components along 5 coordinate axes. In $\mathbb{R}^n$, a vector is typically written as a column or 6 row of $n$ real numbers and can be added to other vectors or scaled by real 7 numbers. 8 9 1. Basic vector notation (inline): 10 11 A vector in 2D can be written as $\vec{v} = (v_1, v_2)$. 12 13 2. Column vector (display): 14 15 A column vector in 3D: 16 17 $$ 18 \vec{v} = \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix} 19 $$ 20 21 3. Vector in $\mathbb{R}^n$: 22 23 In general, a vector in $\mathbb{R}^n$ is 24 25 $$ 26 \vec{v} = \begin{bmatrix} v_1 \\ v_2 \\ \dots \\ v_n \end{bmatrix}. 27 $$ 28 29 4. Vector addition and scalar multiplication: 30 31 If $\vec{u} = (u_1, u_2)$ and $\vec{v} = (v_1, v_2)$, then 32 33 $$ 34 \vec{u} + \vec{v} = (u_1 + v_1,\; u_2 + v_2) 35 $$ 36 37 and for a scalar $a$, 38 39 $$ 40 a\vec{v} = (av_1,\; av_2). 41 $$ 42 43 5. Magnitude (length) of a vector: 44 45 The length of $\vec{v} = (v_1, v_2, v_3)$ is 46 47 $$ 48 \|\vec{v}\| = \sqrt{v_1^2 + v_2^2 + v_3^2}. 49 $$