Matrix sine-Gordon equation