I have input polygon, lets say I have x,y,width,height of rectangle on 2-d plane. I want to know does this ploygon intersects with a line ? What math I equations to use? I want to know, Red Rectangle intersects with blue line?
Solutions for Rectangle
Check each edge intersects with line, may be simple and basic solution. Is there any other way?
Pls add tags for this questions.

I am merely stating the obvious:
If the edges of your rectangle are parallel to the $x$ and $y$ axis (as depicted in your graph), you can simplify the problem as follows. Suppose your line is of the form $y(x)=ax+b$.
If $a>0$, then it suffices to check whether $y$ intersects the left or lower edge of your rectangle.
If $a=0$, check whether it intersects the left edge.
If $a<0$, check whether it intersects the left or upper edge.