Yes this is a function. Specifically, it is a linear function. It graphs a straight line. It is impossible to pass a single vertical line through more than one point on this graph. So it passes the vertical line test confirming we have a function.
Any input x leads to exactly one output y.