# 2D rotation matrix plus another 2D rotation matrix is a similarity matrix (scaled 2D rotation)

## Alec Jacobson

## November 16, 2011

Consider we have two rotation matrices:
`R`_{1} = / cos(θ_{1}) -sin(θ_{1}) \
\ sin(θ_{1}) cos(θ_{1}) /
R_{2} = / cos(θ_{2}) -sin(θ_{2}) \
\ sin(θ_{2}) cos(θ_{2}) /

Then we can show that:
`R`_{1} + R_{2} = s * R_{3}

where s is a scalar and R_{3} is another 2D rotation.
First we just add the components to get:
`R`_{1} + R_{2} = / cos(θ_{1})+cos(θ_{2}) -(sin(θ_{1})+sin(θ_{2})) \
\ sin(θ_{1})+sin(θ_{2}) cos(θ_{1})+cos(θ_{2}) /

Notice we already have the right pattern:
`R`_{1} + R_{2} = / A -B \
\ B A /

we just need to show that we can pull out a common scaling term and angle from A and B.
We can use trigonometric identities to turn the sums of cosines and the sums of sines into products, namely:
`cos(θ`_{1})+cos(θ_{2}) = 2*cos((θ_{1}+θ_{2})/2)*cos((θ_{1}-θ_{2})/2)
sin(θ_{1})+sin(θ_{2}) = 2*sin((θ_{1}+θ_{2})/2)*cos((θ_{1}-θ_{2})/2)

Now we declare that:
`s = 2*cos((θ`_{1}-θ_{2})/2)
θ_{3} = (θ_{1}+θ_{2})/2

Then it follows that:
`R`_{1} + R_{2}
=
/ s*cos((θ_{1}+θ_{2})/2) -s*sin((θ_{1}+θ_{2})/2) \
\ s*sin((θ_{1}+θ_{2})/2) s*cos((θ_{1}+θ_{2})/2) /
=
s * / cos(θ_{3}) -sin(θ_{3}) \
\ sin(θ_{3}) cos(θ_{3}) /
=
s * R_{3}