Step 1: Cross product of two vectors.
The cross product of vectors \( \vec{A} = \hat{i} + \hat{k} \) and \( \vec{B} = \hat{i} - \hat{k} \) produces a vector perpendicular to both:
\[
\vec{A} \times \vec{B} =
\begin{vmatrix}
\hat{i} & \hat{j} & \hat{k}
1 & 0 & 1
1 & 0 & -1
\end{vmatrix}.
\]
To calculate this, expand the determinant:
\[
\vec{A} \times \vec{B} = \hat{i}
\begin{vmatrix}
0 & 1
0 & -1
\end{vmatrix}
- \hat{j}
\begin{vmatrix}
1 & 1
1 & -1
\end{vmatrix}
+ \hat{k}
\begin{vmatrix}
1 & 0
1 & 0
\end{vmatrix}.
\]
Step 2: Simplify the minors.
- First minor:
\[
\begin{vmatrix}
0 & 1
0 & -1
\end{vmatrix} = 0.
\]
- Second minor:
\[
\begin{vmatrix}
1 & 1
1 & -1
\end{vmatrix} = (1)(-1) - (1)(1) = -1 - 1 = -2.
\]
- Third minor:
\[
\begin{vmatrix}
1 & 0
1 & 0
\end{vmatrix} = (1)(0) - (1)(0) = 0.
\]
Thus, we have:
\[
\vec{A} \times \vec{B} = -(-2)\hat{j} = 2\hat{j}.
\]
Step 3: Normalize the resulting vector.
The magnitude of \( \vec{A} \times \vec{B} \) is \( 2 \). Therefore, the unit vector in the direction of \( \vec{A} \times \vec{B} \) is:
\[
\frac{\vec{A} \times \vec{B}}{|\vec{A} \times \vec{B}|} = \frac{2\hat{j}}{2} = \hat{j}.
\]
Step 4: Final Answer.
The unit vector perpendicular to both \( \vec{A} \) and \( \vec{B} \) is:
\[
\boxed{\hat{j}}.
\]