what causes loud knocking when the ac is running? on 2006 Toyota Matrix

when i turn the ac on high, the car knocks really loud, but if you turn the ac off the knocking goes away, but then returns within seconds but it's not as loud. this is driving me nuts, sounds like something is loose, and it's not the motor because i just put a new motor in the car 2 months ago.

Asked by for the 2006 Toyota Matrix
The pulley on the a/c mount has probably got a worn out bearing. Need to replace the pulley and see if the issue is resolved.
1 more answer
Check all accessory mounting brackets for loose bolts...................Possibly a bad re-man. engine?