I was going through some basic recap of complex numbers and in the book (M. Boas. Mathematical Methods in the Physical Sciences) she says we define $e^{ix}$ by the Taylor series with $x$ replaced by $ix$ and we define $\sin(z)$ by the exponentials $\displaystyle\left(\frac1{2i}\right)(e^{iz}-e^{-iz})$. Why does she say we define the functions to be that, that makes it sound like we are choosing that statement to be true rather than it being logically true. Can we not just replace the real number inputs with the complex inputs and see what happens? Sorry this is quite vague and ambiguous but could someone help clear my view on this? Sorry if this has been asked already this is my first post and I hope I am following any rules.
Edit: the example here is supposed to just illustrate the point of what it means to define something in Mathematics.
In high school one begins by defining $\sin$ for angles in the interval $\bigl[0^\circ, 90^\circ\bigr]$, by considering certain ratios in right triangles. Then one introduces a new angle measure by replacing degrees by corresponding arc lengths on the unit circle $S^1$. Now one has $\sin$ on the interval $\bigl[0,{\pi\over2}\bigr]$. But one readily recognizes that looking at the $y$-coordinates of the points on all of $S^1$ would allow to define a periodic function $\sin:\>{\mathbb R}\to[-1,1]$ with lots of desirable properties.
This is all well and fine, but does not answer the question how to compute the value $\sin t$ for given $t\in{\mathbb R}$. This is where calculus comes in. There are several approaches; and one of them is the following: Consider the map $${\rm cis}:\quad {\mathbb R}\to{\mathbb C}, \qquad t\mapsto e^{it}:=\sum_{k=0}^\infty{(it)^k\over k!}\ .$$ From basic properties of the exponential function (defined by its power series) it follows that ${\rm cis}$ winds ${\mathbb R}$ onto $S^1\subset{\mathbb C}$ in a locally isometric way, i.e., small intervals $[t_1,t_2]$ are mapped onto small arcs on $S^1$ having length $t_2-t_1$. But this means that $${\rm Re}\bigl(e^{it}\bigr)=\cos t, \quad {\rm Im}\bigl(e^{it}\bigr)=\sin t\ ,$$ where $\cos$ and $\sin$ have there original "geometric" meaning. This fact not only allows to compute $\cos t$ and $\sin t$ using a well convergent series, but in the first place gives a universal analytic description of these functions. It is only natural that we now define once and for all $$\cos t:={\rm Re}(e^{it}),\qquad \sin t:={\rm Im}(e^{it})\qquad (t\in{\mathbb R})\ ,$$ so that we from now on can work with these functions without referring to a cloudy notion of "angle", and get for free and without case distinctions their well known properties (addition theorems, etc.): These properties can immediately be derived from corresponding properties of the exponential function.