Convex or Concave

Every polygon is either concave or convex. Here is one way to tell what kind of polygon you have. Ask this question. Is there a segment with both endpoints inside the polygon but part of the segment outside the polygon? If the answer is YES then the polygon is CONCAVE. If the answer is NO, then the polygon is CONVEX.
Image