Consider the following rectangle with dimensions 320 by 130.
After rotating the rectangle 10 degrees clockwise from the center (x: 160, y: 65), it looks like this.
My question is: How do I determine the bounding box dimensions?
I'm talking about the dimensions needed to surround the box, such as:
The answer is 346 by 232 but I only found that out because of the program I am using to make this image.
I've also done an example with programming such as:
rotate(10)
width = x1 - x3 + x2
height = y2 - y1 + y4
But, I'd like to solve this without programming. Where should I start with this?



Let four corners of rectangle be $(x_1,y_1),(x_2,y_2),(x_3,y_3),(x_4,y_4)$.
Assume $(x_4,y_4) = (0,0)$
Now the box is rotated by an angle $\theta$ degrees, hence corner of box after rotation becomes $R[x_1,y_1]^T = (a_1,b_1),R[x_2,y_2]^T = (a_2,b_2),R[x_3,y_3]^T = (a_3,b_3),R[x_4,y_4]^T = (a_4,b_4)$.
where
$$R = \begin{bmatrix} \cos(\theta) & - \sin(\theta)\\ \sin(\theta) & \cos(\theta) \end{bmatrix}$$
Now that you know the corners of the rotated rectangle or box, you can find the rectangle bounding the box.