What are the steps to get $X(t)$, when we know what $f(X,t)$ is equal to, when solving ODE's (example attached) 
$$f(X,t)=\pmatrix {-y \\x}$$
  Exact solution is  circle:
  $$X(t)=\pmatrix {r \cos(t+k) \\ r\sin(t+k)}$$

$f(x,t)$ is known to be $\frac{d}{dt}(X(t))$.
I am also confused about the additional $r$ and $k$ given in the answer and how to get to the answer itself (I assume $r$ would be the radius?)
I have not solved ODE's with matrices and lack the terminology, so could not find any help on how to solve something like this.
 A: You can easily write your DE in the form 
$$X'=AX$$
A is a $\pi/2$ rotation (counter clock wise):
$$X'=\pmatrix{0 & -1\\ 1&0}X$$
You can solve this system without  matrix algebra:
$$X'(t)=\pmatrix{x \\ y}'=\pmatrix{-y \\ x}$$
It's the same as:
$$
\begin{cases} x'=-y \\
y'=x
\end{cases}
$$
$$x'=-y$$
Differentiate both sides:
$$x''=-y'=-x \implies x''+x=0$$
The cgaracteristic polynomial is:
$$r^2+1=0 \implies r= \pm1$$
The solution is then :
$$\boxed {x(t)=c_1\cos(t)+c_2\sin(t)}$$
Do the same for $y$
$$y=-x'$$
$$\boxed{y(t)=c_1\sin(t)-c_2\cos(t)}$$
You can rewrite these solutions in the form $A\cos(t+B)$ with trigonometric formulas of addition.
A: If you look at the right side, you might recognize that it represents a rotation by $90^\circ$ of the position vector. Now one should know that the curves that go in a direction orthogonal to their direction vector all lie on circles around the origin. And indeed, you can calculate and insert
$$
\frac{d}{dt}(x(t)^2+y(t)^2)=0.
$$
Now set $r=\sqrt{x(0)^2+y(0)^2}$ so that 
$$
x(t)^2+y(t)^2=r^2
$$
This is a circle equation for the circle around the origin of radius $r$. Points on the circle can be parametrized by the trigonometric functions, that is, by their polar coordinates
$$
x(t)=r\cos(\phi(t)),~~ y(t)=r\sin(\phi(t)).
$$
Now computing derivatives one finds $\dot \phi(t)=1$, which has the general solution $\phi(t)=t+k$. 
