These masks are image processing filters.
In practice, you don't actually rotate the masks, but by looking at axes of symmetry
you can get some insight into what the mask will do in operation.
The left mask will detect horizontal and vertical lines.
The right mask will detect horizontal and vertical lines, as well as lines at +/- 45 deg.