One can read everywhere that linear regression is a convex optimization problem and thus gradient descent will find the global optimum.

But can someone explain how to proof that it is a convex problem? Is it because of the linear regression function or is it because of the RSS cost function?