Why oxygen is prepared in laboratory by directly heating POTASSIUM CHLORATE?

I am unable in doing my chemistry h.w.Please make it fast .and give a detailed answer.
4 answers 4