Disprove me if I'm wrong, but I guess since every graph is made up on points, then all you have to do is know how to rotate a certain given point, and then repeat the process for every point on the line (i.e. the equation) to get the full rotation of the graph. So grab a point (x, y). Let's say we want to rotate it counterclockwise

degrees. Call this new point (a, b). Join points (0,0) and (a,b); and (0,0) and (x,y). The distance from (x,y) to (0,0) is

and so is the distance between (a,b) and (0,0). Now the angle between (x,y) and the x-axis is
 )
and so the angle between (a,b) and the x-axis would be
 + \theta )
. Drop a vertical line down from (a,b) to the x-axis to form a triangle. Using trig, we know that
 + \theta\right) = \frac{b}{\sqrt{x^2 + y^2}} )
and so
 + \theta\right)\sqrt{x^2 + y^2} = \boxed{ x\sin(\theta) + y\cos(\theta)} )
seeing that they are all positive. Similarly,
 + \theta\right) = \frac{a}{\sqrt{x^2 + y^2}} )
so
 + \theta\right) \sqrt{x^2 + y^2} = \boxed{x\cos(\theta) - y\sin(\theta) })
. Hence after rotation, we have the point
 - y\sin(\theta) , x\sin(\theta) + y\cos(\theta) \right) )
, which is precisely the matrix formula. Again, I'm not sure of the veritability of this 'proof'.