Draw two lines in tikz that cross an axis at the same point

tikz-pgf

In tikz/pgf I would like to draw two lines that cross a coordinate system's Y axis at the same point. I have no clue how to start it. I only know how to draw X and Y axes.
I attach an image what I would like to achieve.
Thanks,
bcsikos

enter image description here

Best Answer

Here's a solution without any math, except the simple use of the calc library:

two lines crossing at a defined point

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{calc}

\begin{document}
    \begin{tikzpicture}
        \draw   (-5,0) -- (5,0)
                (0,-5) -- (0,5);
        
        \coordinate (I) at (0,2);
        \coordinate (A) at (-4,0);
        \coordinate (B) at (-2,0);
        
        \draw   (A) -- ($(A)!2!(I)$)
                (B) -- ($(B)!2!(I)$);
    \end{tikzpicture}
\end{document}
Related Question