# Plot a line on the complex plane knowing one point and its orientation

I want to draw a line on the complex plane which begins at $0.4+0.1i$, and with an angle of $\frac{\pi}{4}$ with respect to the real axis. Is there a simple way to do this in Mathematica?

• Plot[ x - 0.3, { x, 0.4, 1 }] – Andrey R Mar 7 '16 at 20:59
• In fact I would like to generalize this for every theta and point! but thanks – Julien Roussillon Mar 7 '16 at 23:04

of course! :) ... but I'm going to give you some food for thought

v = 4/10 + 1/10 I;
ParametricPlot[Through[{Re, Im}[v]] + {Cos[Pi/4], Sin[Pi/4]} t, {t, 0, 2},
AxesOrigin -> {0, 0}]


• That sounds really good, thanks a lot for your help! – Julien Roussillon Mar 7 '16 at 23:05
• @JulienRoussillon Of course that isn't the easiest way, but you aren't a freshman. So I thought about introducing a few useful tricks.Hope you can follow them – Dr. belisarius Mar 7 '16 at 23:11

Of course, you can also use the new InfiniteLine[] primitive:

Graphics[InfiniteLine[ReIm[0.4 + 0.1 I], ReIm[Exp[I π/4]]]]


An alternative also uses AngleVector[]:

Graphics[InfiniteLine[ReIm[0.4 + 0.1 I], AngleVector[π/4]]]


Generalization should be straightforward.

Here is a visualization courtesy of m_goldberg:

With[{z0 = (4 + 1 I)/10, θ = π/4},
Graphics[{
InfiniteLine[ReIm[z0], ReIm[Exp[I θ]]],
Red, AbsolutePointSize[8], Point[ReIm[z0]]},
PlotRange -> {{-1, 1}, {-1, 1}},
Frame -> True]]