let's consider the coordinate transformation in three-dimensional Euclidean space:
$\mathbf r=\mathbf a+\mathbf r',\qquad\mathbf r=\mathbf ix+\mathbf jy+\mathbf kz,\qquad\mathbf r'=\mathbf i'x'+\mathbf j'y'+\mathbf k'z',\qquad\mathbf a$ is a constant shift vector.
$x=a_x+x'\cos(\widehat{\mathbf i,\mathbf i'})+y'\cos(\widehat{\mathbf i,\mathbf j'})+z'\cos(\widehat{\mathbf i,\mathbf k'}),$
$y=a_y+x'\cos(\widehat{\mathbf j,\mathbf i'})+y'\cos(\widehat{\mathbf j,\mathbf j'})+z'\cos(\widehat{\mathbf j,\mathbf k'}),$
$z=a_z+z'\cos(\widehat{\mathbf k,\mathbf i'})+y'\cos(\widehat{\mathbf k,\mathbf j'})+z'\cos(\widehat{\mathbf k,\mathbf k'}).$
It seems to me that only 5 of these 9 angles are independent, namely 5 of these angles completely set the orientation of the $O'x'y'z'$ coordinate system relative to the $Oxyz$ one. However, I'm not completely sure of it, and I don't know how to prove it and find relations between all these 9 angles.
I would appreciate your advice and/or links (e.g. books).