Artificial intelligent assistant

Find inclination to $z$-axis based on inclination to $x$ and $y$ axes A line $OP$ is inclined at $45^o$ to the $x$-axis and $120^o$ to the $y$-axis. Find its inclination to the $z$-axis. I think the inclination to the $y$-axis does not affect inclination to the $z$-axis, so the answer is $45^o$. However, I don't know how to use dot product to do calculation.

**Hint:** Let $\mathbf u=(u_x,u_y,u_z)$ be a unit direction vector for the line, so that $\|\mathbf u\|=\sqrt{\mathbf u\cdot\mathbf u}=\sqrt{u_x^2+u_y^2+u_z^2}=1$. You have $\mathbf u\cdot\mathbf e_x=u_x=\cos{45°}$ and $\mathbf u\cdot\mathbf e_y=u_y=\cos{120°}$. Solve for $u_z$, which will also be the cosine of the inclination from the $z$-axis $\mathbf u\cdot\mathbf e_z$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 602b6ff13061ab42bc93c692090a9be2