Multiply every component of a vector by a scalar k. Each multiplication is one step; the sign of k controls whether the direction reverses. The state panel shows each scaled component as it is computed.

Example

Multiply each vector component by the scalar to build the scaled vector.

highlighted = computed this step

Step 1 — Set up

Start with the scalar, vector, and empty product vector.

k=2,v=[314],kv=[]k=-2,\quad v=\begin{bmatrix}3\\-1\\4\end{bmatrix},\quad kv=\begin{bmatrix}\square\\\square\\\square\end{bmatrix}

Step 2 — First component

Scale the first component: -2 * 3 = -6.

(2)3=6,kv=[-6](-2)\cdot 3=-6,\quad kv=\begin{bmatrix}\hl{-6}\\\square\\\square\end{bmatrix}

Step 3 — Second component

Scale the second component: -2 * -1 = 2.

(2)(1)=2,kv=[62](-2)\cdot (-1)=2,\quad kv=\begin{bmatrix}-6\\\hl{2}\\\square\end{bmatrix}

Step 4 — Third component

Scale the third component: -2 * 4 = -8.

(2)4=8,kv=[62-8](-2)\cdot 4=-8,\quad kv=\begin{bmatrix}-6\\2\\\hl{-8}\end{bmatrix}

Step 5 — Result

Read the completed scaled vector.

kv=[628]kv=\begin{bmatrix}-6\\2\\-8\end{bmatrix}
scalar multiple Multiplying by a scalar k stretches or compresses the vector and, when k is negative, reverses its direction. Formally: (k v)[i] = k * v[i].