I'm working on the rotation of the state of stress using the book Geodynamics of Turcotte page 101. The 2D coordinate system $x'$ and $y'$ is inclined at an angle $\phi$ with respect to the $x$, $y$ coordinate system (see Figure 2.14).
The force in the $y$-direction on face $AO$ is
$$ \sigma_{yy}AO $$
and the force in the $y$-direction on face $OB$ is
$$ \sigma_{xy}OB $$
The force in the $y$-direction on face $AB$ is
$$ -\sigma_{x'x'}AB\cdot\sin\theta -\sigma_{x'y'}AB\cdot\cos\theta$$
I don't understand why the force in the $y$-direction on face $AB$ is equal to the above equation?
I think the negative signs are there because the stresses are not oriented in the same direction than the $y$-direction. I don't know why it is necessary to subtract the two lengths.