
\begin{tikzpicture}
   \coordinate (O) at (0,0);
   \coordinate (i) at (1,0);
   \coordinate (j) at (0,1);

   \draw[-latex] (O) -- (i);
   \draw[-latex] (O) -- (j);
   
   %Polar coordinates: in degrees
   \coordinate (P) at (45:3);
   \coordinate (Q) at (-2,2);
   \coordinate (R) at (4,1);

   %Projection of R on PQ
   \coordinate (S) at ($(P)!(R)!(Q)$);

   \gettikzxy{(R)}{\sx}{\sy};
   
   \filldraw (O) circle(2pt) node[anchor=north east] {$O$};
   \filldraw (P) circle(2pt) node[anchor=north east] {$P$};
   \filldraw (Q) circle(2pt) node[anchor=north east] {$Q$};
   \filldraw (R) circle(2pt) node[anchor=north east] {$R$};
   \filldraw (S) circle(2pt) node[anchor=north east] {$S$};

   %Convex Combinations
   \draw ($(P)!-1!(Q)$) -- ($(P)!2!(Q)$);
\end{tikzpicture}
