Let #barA = -3hati + hatj - hat k#

Let #barB = hati + hatk#

Let #barC = # the vector perpendicular to both #barA and barB# such that the following is true:

#barC = barA xx barB#

#barC = |
(hati, hatj, hatk, hati, hatj),
(-3,1,-1,-3,1),
(1,0,1,1,0)
|#

#barC = {1(1) - (-1)(0)}hati + {-1(1) - (-3)(1)}hatj + {-3(0) - (1)(1)}hatk#

#barC = hati + 2hatj -hatk#

Check:

#barC*barA = (1)(-3) + (2)(1) + (-1)(-1) = 0#

#barC*barB = (1)(1) + (2)(0) + (-1)(1) = 0#

This checks but #barC# is not a unit vector.

To make it a unit vector we must divide #barC# by its magnitude.

#|barC| = sqrt(1^2 + 2^2 + (-1)^2)#

#|barC| = sqrt(6)#

Dividing by #sqrt(6)# is the same as multiplying by #sqrt(6)/6#

The unit vector is:

#hatC = sqrt(6)/6hati + sqrt(6)/3hatj - sqrt(6)/6hatk#