Q:

How to rotate a bounding box in XNA?

I'm trying to rotate a bounding box in xna, this is how I usually do it:
    new Rectangle((int)position.X, (int)position.Y, (int)texture.Width, (int)texture.Height);

but It currently does not return the rotation that is in my draw code: 
    spriteBatch.Draw(texture, position, null, Color.White, rotation, origin, scale, SpriteEffects.None, 1f);

how do I rotate it with the player? I was trying to figure this out and stumbled across this:
2D BoundingRectangle rotation in XNA 4.0 
but I'm not quite sure how to implement the Matrices he's talking about,and I'm making a 2d game as opposed to the 3d one here.

A:

The Rectangle structure is an axis aligned bounding rectangle. The sides will always be parallel to the X and Y axes. If you want a rotated bounding rectangle you have to implement it yourself.
One algorithm for calculating collision of rotated rectangles is the Separating Axis Theorem.
Matrices are, as stated in the linked answer, essential in computer graphics. You can rotate a shape by rotating each of its vertices with the same rotation matrix. This is the general rotation matrix for two dimensions:

Matrices are then "applied" to vectors with matrix-vector multiplication:

which equals

