\documentclass{article}
\usepackage{tikz}
\usepackage[paperwidth=10cm,paperheight=10cm,margin=0cm]{geometry}
\setlength{\parindent}{0pt}
\newcommand{\labase}{%
\clip (-5,-5) rectangle (5,5);
\draw[->] (-5,0) -- (5,0);
\draw[->] (0,-5) -- (0,5);
\draw plot[domain=-5:-0.1,samples=100] (\x,{1/\x});
\draw plot[domain=0.1:5,samples=100] (\x,{1/\x});
\node[below left] at (0,0) {$O$};
}
\begin{document}
\include{tikz}
\end{document}