The tidal tensor $T_j^i=-\frac{\partial^2 \phi}{\partial x^i \partial x^j}=\frac{\partial g^i}{\partial x^j}$ for the potential $\phi=-G M / r$ is calculated as follows (as shown in your document):
Off-Diagonal Elements ( $i \neq j$ ):
$$ T_j^i=\frac{\partial}{\partial x^j}\left(-\frac{G M x^i}{r^3}\right)=-G M x^i\left(-3 \frac{x^j}{r^5}\right)=\frac{3 G M x^i x^j}{r^5} $$
Diagonal Elements ($i=j$) :
$$ T_i^i=\frac{\partial}{\partial x^i}\left(-\frac{G M x^i}{r^3}\right)=G M\left[\frac{3\left(x^i\right)^2-r^2}{r^5}\right]=G M\left[\frac{3\left(x^i\right)^2}{r^5}-\frac{1}{r^3}\right] $$
The full tensor $T_{i j}$ can be compactly written as:
$$ T_{i j}=G M\left(\frac{3 x^i x^j}{r^5}-\frac{\delta_{i j}}{r^3}\right) $$
where $\delta_{i j}$ is the Kronecker delta (equal to 1 if $i=j$ and 0 if $i \neq j$ ).
The full tensor is defined by two terms: a stretching component and a compression/squeezing component.
What is the expression for the tidal tensor outside a spherical mass distribution-L.mp4