1) The position vectors of A and B are OA= -i+2j+k and OB = i+bj+k respectively.

a) Find ,in terms of b, the unit vector in the direction of AB
b) Given AB = 2, find the value of b.

a vector in the direction from A to B is C = B-A = 2i + (b-2)j

The unit vector c = C/|C| = 2/√(b^2-4b+8) i + (b-2)/√(b^2-4b+8) j

If |C| = 2, then b^2-4b+8 = 4 or b = 2
Or, since |2i + (b-2)j|=2, b-2 must be zero

To find the unit vector in the direction of AB, we need to find the vector AB first.

a) To find AB, we subtract vector OA from vector OB:
AB = OB - OA
= (i + bj + k) - (-i + 2j + k)
= i + bj + k + i - 2j - k
= 2i + (b-2)j

The magnitude of AB is given by:
|AB| = √((2i)^2 + (b-2)j^2)
= √(4 + (b-2)^2)
= √(b^2 - 4b + 4 + 4)
= √(b^2 - 4b + 8)

b) We are given that |AB| = 2. Therefore, we can set up an equation and solve for b:
2 = √(b^2 - 4b + 8)

Squaring both sides of the equation:
4 = b^2 - 4b + 8

Rearranging the equation:
b^2 - 4b + 4 = 0

Now we can solve this quadratic equation by factoring or using the quadratic formula.
The equation factors as:
(b - 2)(b - 2) = 0

So, b = 2 is the only solution.

Therefore, the value of b is 2.