I know what the graph of:

y=cos^-1(cos(x))
looks like.
However, can someone explain to me how you would know how to sketch it without simply subbing in values to get points. Something about restrictions and how it is a periodic function possibly?