0
$\begingroup$

Hi I want to to show graphically:

$$\vec{x} = \vec{p} + t(\vec{q}-\vec{p})$$ for vectors $\vec{x},\vec{p},\vec{q}$ and t varying from 0 to 1 in $\mathbb{R}^2$. So basically the vector $\vec{x}$ goes along line segment between P and Q. Obviously I could define specific vectors $\vec{p}$ and $\vec{q}$. How could I do this?

BTW how do I type latex in this forum?

$\endgroup$

1 Answer 1

1
$\begingroup$

Here's a bit code that produces an animation of what you described:

org = {0, 0};
p = {5, 1}; q = {2, 6};
pvec = {Red, Arrow[{org, p}]};
qvec = {Blue, Arrow[{org, q}]};
Animate[Show[
  Graphics[{pvec, qvec, {Black, Arrow[{org, p + t (q - p)}]}}, 
   Frame -> True],
  ImageSize -> 150], {t, 0, 1}]

If you want to see an image at a specific value of $t$, at $t=1/3$ maybe, you could use this:

Show[
  Graphics[{pvec, qvec, {Black, Arrow[{org, p + t (q - p)}]}}, 
   Frame -> True],
  ImageSize -> 150] /. t -> 1/3

Instead of Latex we use something similar called Markdown. That link will be useful in learning how to format questions and answers on this site. The link is part of the Help Center, which you may also find useful.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.