n=∣A∣=∣B∣(1)Iff−surjective.Let′sprovethatit′salsoinjective.Thatmeansthat∀y∈B∃x∈A:f(x)=y.Inanotherwords:foreveryy∈Bexistsx∈Asuchasf(x)=y.Letconsidery1,y2∈B(y1=y2)andx1,x2∈Asuchasf(x1)=y1=f(x2)=y2So,x1=x2.So,foreverydistincty∈Bthereisuniquex∈A.Thereisndistincty⇒ndistinctx.So,foreveryxthereisdistincty.So,functionisinjective.(2)Iff−injective.Let′sprovethatit′salsosurjective.Fordifferentx∈A,therearediferrenty∈Bsuchasf(x)=y.Sincewehavendifferentx∈Aweshouldhavendifferenty∈B.Sincen=∣B∣everyy∈Bhasx∈Asuchasf(x)=y.So,functionissurjective.Checkingbothcaseswhenoneconditionistruewegetsecondconditionalsobeingtrue.