How to find transfer function by state space representation matrices A state space representation is given by:
$$\dot{x}= \begin{bmatrix}0 &amp; 0 &amp; 0 &amp; 0\\ 1 &amp; 0 &amp; 0 &amp; 0 \\ 0&amp;0&amp;-2&amp;-4\\0&amp;0&amp;1&amp;0\end{bmatrix}x+\begin{bmatrix} 1\\0\\1\\0\end{bmatrix} u$$
$$y=\begin{bmatrix}0 &amp; 1 &amp; 0 &amp; -1\end{bmatrix}x$$
I need to find a transfer function of this system. I don't know how, but I've tried it this way:

I wrote all equations:
$$\dot x_1 = u$$
$$\dot x_2 = x_1$$
$$\dot x_3 = -x_3-4x_4+u$$
$$\dot x_4=x_3$$
$$y=x_2-x_4$$

And I've draw a scheme of such system:


And then tried to find its transfer function.
$$-4X_4-2sX_4+U = X_4s^2$$
$$U = X_4(s^2+4+2s)$$
$$X_4= \frac{U}{s^2+2s+4} $$
$$X_2 = \frac{U}{s^2}$$

$$Y = X_2 - X_4 = \frac{U}{s^2} -\frac{U}{s^2+2s+4}$$
$$G(s) = \frac{Y(s)}{U(s)} = \frac{1}{s^2} -\frac{1}{s^2+2s+4}=\frac{2(s+2)}{s^2(s^2+2s+4)}$$
I don't know, whether this is right answer nor solution. 

What solution would you recomend for this task? Is the solution above correct?
Use the fact that $\dot x_1 = s x_1$ and take it from there. It appears that your result is correct.

It should be noted that there is a closed form expression to map a state-space representation to a transfer function. However, it includes inverting a matrix with s variables and may hence be more challenging than just solving it as stated above