Finding the equation of the straight line $y=ax+b$? 
If I have a circle $x^2+y^2=1$ and line that passes trough $(0,0)$
and I know the angle between the line and the axis. If, for example, the angle is $\frac{\pi}{3}$, how can I find the equation of the straight line $y=ax+b$?
 A: The slope of a line is often described as 'rise over run'. Say you have some known point $x_1, y_1$, and $x_0 = y_0 = 0$, then the slope is given by:
$$a = \frac{y_1 - y_0}{x_1 - x_0}$$
When we consider the definition of the tangent function, it is built on the same principles. It turns out that
$$\tan\theta = \frac{\sin\theta}{\cos\theta} = a$$
In the case of $\theta = 60\deg = \pi/3$:
$$y = \tan(\pi/3)\ x = \sqrt{3}\ x$$
You don't need to worry about the 'radius' because the scale is removed when you consider:
$$a = \frac{y_1 - y_0}{x_1 - x_0} = \frac{r\cdot\big(y_1 - y_0\big)}{r\cdot\big(x_1 - x_0\big)}$$
A: You do know that $b$ is called the "$y$-intercept", right?
There is a reason for that: $b$ is the value of $y$ where the line
crosses the $y$-axis.
Now look at the figure and see where the line crossed the axis and what
the value of $y$ is at that point.
Recall that $a$ is the slope of the line, which you can get from
the coordinates of two points on the line $(x_0,y_0)$, $(x_1,y_1)$
like so:
$$ a = \frac{y_1 - y_0}{x_1 - x_0}.$$
You already have one point, $(x_0,y_0) = (0,0)$.
So you just need to find one other point, for example
one of the points on the circle where the line intersects it,
or draw a right triangle with one leg from $(0,0)$ to $(1,0)$
(along the $x$-axis) and see where the third point is if the
angle at $(0,0)$ is $\frac\pi3$.
A: What happens if angle is $\frac{\pi}{2}$? Best to use the general line equation of $ax+by+c=0$ instead of $y=\ldots$
So the general equation for a line with direction angle $\theta$ that passes through the point $(x_c,y_c)$ is
$$ (-\sin\theta)x + (\cos\theta)y + (x_c \sin\theta - y_c \cos\theta) = 0 $$
In your case $(x_c,y_c)=0$ so you have $$(-\sin\theta)x + (\cos\theta)y = 0 $$ or $$\boxed{ y = x \tan \theta } $$
