Rational function with absolute value $1$ on unit circle 
What is the general form of a rational function which has absolute value $1$ on the circle $|z|=1$? In particular, how are the zeros and poles related to each other?

So, write $R(z)=\dfrac{P(z)}{Q(z)}$, where $P,Q$ are polynomials in $z$. The condition specifies that $|R(z)|=1$ for all $z$ such that $|z|=1$. In other words, $|P(z)|=|Q(z)|$ for all $z$ such that $|z|=1$. What can we say about $P$ and $Q$?
 A: You can show that 
$$R(z)= \frac{1}{\overline{R\left(\frac{1}{\overline{z}}\right)}}.$$
If $w$ is a zero for $R$, then $\frac{1}{\overline{w}}$ is a pole for $R$. Similarly, the existence of a pole implies the existence of a zero. 
A: If a rational function $R$ satisfies $\lvert R(z)\rvert = 1$ for $\lvert z\rvert = 1$, then the rational function
$$M(z) = R(z)\cdot \overline{R(1/\overline{z})}$$
satisfies $M(z) = 1$ for $\lvert z\rvert = 1$, therefore it is constant (a nonconstant rational function attains every value only finitely often), and $R$ satisfies
$$R(1/\overline{z}) = 1/\overline{R(z)}.$$
Hence the poles and zeros of $R$ are related by reflection in the unit circle; if $\zeta$ is a zero of order $k$, then $1/\overline{\zeta}$ is a pole of order $k$ and vice versa.
Thus, if $(a_n)_{0\leqslant n \leqslant N}$ are the distinct zeros and poles of $R$ in the unit disk, with orders $m_n$ ($m_n > 0$ for zeros, and $m_n < 0$ for poles), and $a_0 = 0$ [$m_0 = 0$ is allowed], the product
$$B(z) = z^{m_0}\cdot \prod_{n=1}^N \left(\frac{z - a_n}{1-\overline{a_n}z}\right)^{m_n}$$
is a rational function having exactly the same zeros and poles as $R$, and also $\lvert B(z)\rvert = 1$ for $\lvert z\rvert = 1$. So the quotient $R(z)/B(z)$ is a rational function without zeros or poles, hence constant, and therefore
$$R(z) = \lambda\cdot B(z)$$
for some $\lambda$ with $\lvert\lambda\rvert = 1$.
A: Answer your question about why $M$ is constant: it's simply because $M$ is a quotient of two polynomials. If the quotient is $1$ on the unit circle, it means these two polynomials are equal at all the points of the circle. This implies that these two polynomials are the same. So $M$ is identically $1$. 
A: For your doubt regarding the polynomial turning out to be constant, observe that a rational function has finitely many zeros. So any value must be attained finitely many times(equal to the order of said rational function)
A: Define $M(z)$ the same as the high-voted answer. And we know (if you want to prove it, it's easy), if $f(z)$ is analytic and so is $\ \overline{f(\bar z)}\ $analytic. We choose $f(z) = R(1/z)$, so $\overline{R(1/\bar z )}$ analytic and thus $M(z)$ is analytic. 
