No, they are not the same thing at all, but the distinction is often clouded in the way functions are presented. Here is your example:
This is a function: 4x + 2
This is an equation used to define f(x) as a function: f(x) = 4x + 2
This is an equation: y = 4x + 2
In that last equation y is equated to a function of x. That defines a relation between x and y. It might be said that y is then a function of x, but the equation itself is not a function.
In introductions to functions y often is equated to a function of x so that certain function properties can be shown graphically. This is a useful model, but it inevitably leads to confusion. Students and teachers both tend to refer to the relations as functions. The variable y is arbitrarily conferred a special status, although x or any other variable might just as easily be equated with a function.
Below are a few notes on the subject. I am not sure whether this will help or simply confuse. I hope to help.
A function argument can have more than one variable, and the variables need not be numbers at all.
The vertical line test for a function applies only for seeing if y is a function of x. There are other ways to present of function in a plane, and some functions cannot be graphed in the plane at all.
Domain and range are properties of functions, not equations or other relations, and certainly not geometric figures drawn in the plane.
Not all functions have an inverse. If a function does have an inverse, then the inverse is itself of function, always.