Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Find all $\theta$ such that sin$\theta$ and cos$\theta$ are both rational number.

I thought this question might have been asked by someone else, but I couldn't find any.

Currently I'm studying Pythagorean triple, so naturally I put $X$=cos$\theta$ and $Y$=sin$\theta$, then

$$X^2 +Y^2 =1: X,~Y \in \Bbb{Q}$$

By using graph or from the graphical proof of Pythagorean triple, one can show that


where $(a, b)=1$. But then, we have to find $\theta$ which makes $X$ and $Y$ in that form. So I got stuck. I've thought of using the inverse trigonometric function, but we still have two equations then. So I was wondering if there is any simpler way to express $\theta$ which satisfies the given condition. I'm even more confused because I don't have the answer!


share|cite|improve this question
Any $$\theta=\arctan\frac{2ab}{a^2-b^2}$$ with $b\ne0,a$ integers will satisfy this – lab bhattacharjee Nov 17 '13 at 6:05
@labbhattacharjee Yeah... I also think this is the best answer. I actually expected somewhat more 'integer like' answer since I'm studying baby number theory. Thanks. – Taxxi Nov 17 '13 at 6:11
I don't understand 'baby number theory' and 'integer like' answer. – lab bhattacharjee Nov 17 '13 at 6:12
@labbhattacharjee I mean since I'm studying easy elementary number theory problems, most of the solutions were in the form of integers or rational numbers, not like the solution of this question. That was why I was baffled at this question and wondering if there might be more simple answer (since I don't have the solution). – Taxxi Nov 17 '13 at 6:17
It can be shown that apart from the obvious ones, none are of shape $r\pi$ where $r$ is rational. – André Nicolas Nov 17 '13 at 7:10

Every right triangle is similar to a right triangle with sides of

$$2, \; r-\frac 1r, \; \text{ and } r + \frac 1r$$

The corresponding values of sine and cosine will also be rational if and only if r is rational.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.