The line does represent a function.
Moreover it's a one to one function because it passes the vertical test (a vertical line intersects the function in ONE and ONLY ONE point, so it's a function.
It's also a one to one function because it passes the HORIZONTAL line testr, so it's a ONE-TO-ONE function since the HORIZONTAL test intersects in one and only one point