How is every binary relation BCNF? So, as part of my assignment, I have to prove that any relation with two attributes is in BCNF.

As per my understanding, if for a relation we have 3rd normal form and one non key attribute functionally determine key attribute, it violates the BCNF.

Say my relation consists of two attributes A1,A2

Scenario1(only one functional dependency)

A1 -&gt; A2 (so A1 is the key, and A2 does not FD A1 : so no violation)


same applies for 

A2 -&gt; A1


But what if 

A1-&gt;A2 and A2-&gt;A1


Here key can be either A1, A2. And the other non key attribute functionally determines the key.
A relation is in BCNF when, for all FDs that apply to the relation, the left hand side is a superkey. That is, it has to contain all the attributes of at least one key. Your relation must have at least one candidate key (that is, you can't have repeating rows in the relation), else it wouldn't even meet the conditions for 1NF. 

Given this, your relation can have zero, one or two FDs. The case for zero FDs is trivial (ab->ab). For one FD (a->b) the left hand side attribute is clearly the key.

In the case where you have FDs in both directions (a->b and b->a) you simply have two different keys, and so the left hand side of each FD remains a superkey.