Let's consider one-layer network that consists of two two-input neurons, Fig. 3.


Fig. 3. One-layer network: two two-input neurons

Let first neuron recognises input vector X = A = [a1; a2], and second neuron recognises input vector X = B = [b1; b2]. Then such equations are satisfied:

w1(1) = a1
w2(1) = a2
w1(2) = b1
w2(2) = b2
For X = A the following responses are obtained:
y(1) = w1(1)*a1 + w2(1)*a2 = a1*a1 + a2*a2 = 1
y(2) = w1(2)*a1 + w2(2)*a2 = b1*a1 + b2*a2 = cos(γ)
and for X = B:
y(1) = w1(1)*b1 + w2(1)*b2 = a1*b1 + a2*b2 = cos(γ)
y(2) = w1(2)*b1 + w2(2)*b2 = b1*b1 + b2*b2 = 1
where γ - angle between A and B vectors.
The attained results show that the response of the first neuron to vector B equals the response of the second neuron to vector A. The response of each neuron to "its" vector obviously equals 1. The threshold value may be set us arithmetic average of these answers:
th = (1+cos(γ))/2

For instance, the responses to vectors A = [0; 1] and B = [1; 0] (Fig. 4) are: 1 and 0 (vectors are perpendicular) The threshold value can be set as 0,5.


Fig. 4.