Hi iv been working through a couple questions in to do with ring theory and i'm stuck on one relating to finite domains.

Question: Prove that every finite domain contains an identity element

I have a solution to this but am not sure if i'm going about it the right way mainly because I am slightly unclear on the definition of a finite domain compared with a finite integral domain.

my solution is:

define a function f:R to R with f(x)=xy

then f(x) = f(a) which implies that y(a-x)=0.

since y not equal to 0, a=x. Thus f is injective and because it is finite on f:R to R so it must also be surjective.

Therefore there exists w in R such that f(w)= yw = 1_{R}

any advice you can give me is aprreciated even if it is just clearing up my definitions on things

(I tried putting this in using latex but could not get it working)