1)
A(2,0,1), B(-1,3,4) C(-1,3,0), D(4,-2,5)
Eqn of the line through AB is given by,
r = OA +t(OB - OA)
r = (2,0,1) + t(-3,3,3)
=================
Eqn of the line through CD is given by,
p = OC +s(OD - OC)
p = (-1,3,0) + s(5,-5,5)
==================
intersection of the two lines is gotten by r=p, giving,
(2-3t)i + (0+3t)j + (1+3t)k = (-1+5s)i + (3-5s)j + (0+ 5s)k
equating coefficients,
2 - 3t = -1 + 5s
3t = 3 - 5s
1 + 3t = 5s
solving we get,
s = 2/5, t = 1/3
============
substituting for s or t in either of the eqns for r or p gives the point of intersection as,
(2,0,1) + (1/3)(-3,3,3) = (2,0,1) + (-1,1,1) = (1,1,2)
ans = (1,1,2)
==========
A(2,0,1), B(-1,3,4)
|AB| = √(2+1)² + (0-3)² + (1-4)²
|AB| = √(3² + 3² + 3²)
|AB| = 3√3
========
C(-1,3,0), D(4,-2,5)
|CD| = √(-1-4)² + (3+2)² + (0-5)²
|CD| = √(5² + 5² + 5²)
|CD| = 5√3
========
AB = OB - OA = (-3,3,3)
CD = OD - OC = (5,-5,5)
AB.CD = (-3,3,3).(5,-5,5) = -3.5 + 3.(-5) + 3.5 = -15 -15 + 15 = -15
AB.CD = -15
=========
AB.CD = |AB||CD|.sin@
-15 = 3√3.5√3.sin@
-15 = 45.sin@
sin@ = -1/3
@ = 109.47 deg
smallest angle between lines is 180 - @ = 70.53 deg
=======================================