system
Given the following post, respond as if you're commenting on Reddit:
human
Why do shockwaves form at the leading and trailing edge of objects moving at supersonic speeds?

I've just started to study shockwaves this year at university and we've been shown images of double-wedge aerofoils with  leading edge and trailing edge shocks. 

I understand why shocks form but what I don't understand is why you have them at both edges. Is it just the flow coming off the upper and lower surface and hitting itself?
gpt
the leading edge of the wedge produces an attached oblique shockwave that doesn't reduce the speed of the flow below Mach 1.0 if the freestream flow is supersonic.

Since the flow is still supersonic, passing over the corner in the center of the double wedge airfoil creates an expansion wave which increases the speed of the flow.  The shock at the trailing edge is created as the flow is turned back into the direction of the freestream as if it hit a corner.

You would see similar phenomena with a flat plat at some non-zero angle of attack except you would have expansion waves on the upper leading edge and lower trailing edge.  The diamond shape causes oblique waves at the leading and trailing edges at no angle of attack.