#Vectors math problem

11 messages · Page 1 of 1 (latest)

brazen plazaBOT
orchid kestrel
#

It’s either -18cm or 18cm

#

Can the length of the vector be negative?

warm night
#

length is a positive function.
note that length is calculated by |v| = sqrt(v^2)

orchid kestrel
#

I meant magnitude

#

Im not a native english speaker

warm night
#

vector magnitude and length is the same thing so youre in the clear

zinc ledge
#

\pgfkeys{/pgf/number format/.cd,fixed,int detect,precision=2,relative*={0}}
\pgfmathsetmacro\vx{12}
\pgfmathsetmacro\vy{0}
\pgfmathsetmacro\k{-3/2}
\pgfmathparse{veclen(\vx,\vy)}
\pgfmathsetmacro\vlen{\pgfmathresult}
\begin{figure}
\begin{tikzpicture}[x=5cm/\vlen,y=5cm/\vlen,]
% first arrow
\draw[-latex,blue!40] (0,0) -- (\vx,\vy) node [midway,sloped,above] {$\lVert{\vec{v}}\rVert = \pgfmathprintnumber{\vlen}$};
% scaled arrow
\pgfmathparse{\k * veclen(\vx,\vy)}
\pgfmathsetmacro\vlen{\pgfmathresult}
\draw[-latex,red!40] (0,0) -- (\k * \vx, \k * \vy) node [midway,sloped,above] {$\lVert kv \rVert = \pgfmathprintnumber{\vlen}$};
\end{tikzpicture}
\caption*{length of vector $\color{blue!40}\vec{v} = (\vx, \vy)$ and scaled vector $\color{red!40}k\vec{v}$ with $k = \k$}
\end{figure}

fast anvilBOT
#

vin100

orchid kestrel
#

.close