Consider:

a = {9, -5};

u = a/Norm[a];

Graphics[{

Blue, Arrow[{{0, 0}, a}],

Red, Arrow[{{0, 0}, u}],

Text[Style[“<9, -5>“, Blue, Background -> White], {9, -5.4}],

Text[Style[

“<\!\(\*FractionBox[\(9\), SqrtBox[\(106\)]]\), \
-\!\(\*FractionBox[\(5\), SqrtBox[\(106\)]]\)>“, Red,

Background -> White], {1.5, -1.5}]

},

Axes -> True, AxesLabel -> {x, y},

PlotRange -> {{0, 10}, {-6, 0}},

GridLines -> {Range[1, 10], Range[-6, -1]}]

Which gives this image:

Now, I’d like to add a piece of a unit circle (in Red), which goes from the point (1,0) to the point (0,-1).

Suggestions?

=================

Circle[] can take a third argument for producing arcs of circles; you might want to look at that. Also, a/Norm[a] is more compactly done as Normalize[a].

– J. M.♦

May 24 ’15 at 1:18

=================

1 Answer

1

=================

The edit is the additional graphic. You can dress up the coloring and thickness yourself, here’s the modification (the new first graphic entry):

a = {9, -5};

u = a/Norm[a];

Graphics[{

Red, Circle[{0, 0}, 1, {0, -Pi/2}],

Blue, Arrow[{{0, 0}, a}],

Red, Arrow[{{0, 0}, u}],

Text[Style[“<9, -5>“, Blue, Background -> White], {9, -5.4}],

Text[Style[

“<\!\(\*FractionBox[\(9\), SqrtBox[\(106\)]]\), \
-\!\(\*FractionBox[\(5\), SqrtBox[\(106\)]]\)>“, Red,

Background -> White], {1.5, -1.5}]}, Axes -> True,

AxesLabel -> {x, y}, PlotRange -> {{0, 10}, {-6, 0}},

GridLines -> {Range[1, 10], Range[-6, -1]}]

Perfect. Thanks. Now I am searching for a way to add an arrow to the end of the circle. Gonna read http://stackoverflow.com/questions/5705243/how-can-i-make-a-directed-arc-of-a-circle-or-a-directed-curve/5706674#5706674.

– David

May 24 ’15 at 2:58

@David Regarding an arrowhead, for lack of anything better, add the graphic line below the circle segment graphic line, Arrow[{{.001, -1}, {0, -1}}, -.2]. Seems like a bit of a cheat, but it works. It’ll give you a red arrowhead at the end of that circle segment, and only the arrowhead will show.You might tweak those parameters a bit, but set that way on your graph, it looks fine to me. Basically an arrow with no tail.

– J. W. Perry

May 24 ’15 at 3:33

Right now, the simplest thing I have found for students that are beginners in Mathematica is: Red, Arrow[Table[{Cos[t], Sin[t]}, {t, 0, -Pi/2, -Pi/100}]],

– David

May 24 ’15 at 4:01

I actually saw that. Looks good too.

– J. W. Perry

May 24 ’15 at 4:04