First of all, please let me admit that my math is very rusty so that I may not understand some basic concepts.
I'm reading Boyd & Vandenberghe's Convex Optimization. In the book, the authors state that:
A function is convex if and only if it is convex when restricted to any line that intersects its domain.
Honestly speaking, I have no idea what that line means. I know that restriction of the function is the identical function with smaller domain but not sure how it is applicable to the current situation.
I do some searching and feel that the application of above statement is to select 2 random points in the domain and check if they are convex. Hence, the "brute force" way to prove convexity is to keep doing that.
Can anyone verify that what I guess is true and, if it is, explain the connection between the "brute force" way and the statement made by the authors?