The given points are A( 1,2,−3 )and B( −1,−2,1 ).
Formula for vector equation when initial and terminal points are given is,
AB → =( x 2 − x 1 ) i ^ +( y 2 − y 1 ) j ^ +( z 2 − z 1 ) k ^
Here, x 1 =1, x 2 =−1, y 1 =2, y 2 =−2, z 1 =−3 and z 2 =1.
Substitute all values in above formula, we get,
AB → =( −1−1 ) i ^ +( −2−2 ) j ^ +( 1−( −3 ) ) z ^ =−2 i ^ −4 j ^ +4 z ^
Magnitude of vector AB → is,
| AB → |= ( −2 ) 2 + ( −4 ) 2 + 4 2 = 4+16+16 = 36 =6
Direction cosines of AB → are ( x | AB → | , y | AB → | , z | AB → | ).
Here, x=−2, y=−4 and z=4.
Substitute all values for direction cosines, we get,
( −2 6 , −4 6 , 4 6 )=( −1 3 , −2 3 , 2 3 )
Thus, direction cosines of AB → are ( −1 3 , −2 3 , 2 3 ).