I am trying to do some self-studying and am consistently getting bogged down by sophisticated mathematical notation. For example, something simple like this in a book:
Let $X$ be a non empty set and then we define a metric $d$ on X as the function:
$$ d: X \times X \rightarrow \mathscr R $$
Here, I have a confusion as to how I should read it. So d is a function that takes the quantity $X \times X$ and maps it to a real number? I am not sure why this is not written as
$$ d:X \rightarrow \mathscr R $$
I find this notation really in the first equation in the online book: