I understand that a topological group is a group $G$ endowed with a topology $\tau$ on $G$ such that addition and inverse are continuous on $\tau$.
Now, the definition of continuity is that for all $U\in\tau$, $f^{-1}(U)\in\tau$. But in this case $+^{-1}(U)$ is a subset of $G\times G$ because the domain of $+$ is $G\times G$, and we endowed $G$ with a topology, not $G\times G$. So, where am I messing up?
The topology of $G\times G$ is the product topology, which is the topology of the unions of sets of the form $A\times B$, with $A,B\in\tau$.