  For a general third-order tensor $\mathcal{A}\in\mathbb{R}^{n\times n\times
n}$ the paper studies two closely related problems, an SVD-like tensor
decomposition and an (approximate) tensor diagonalization. We develop a
Jacobi-type algorithm that works on $2\times2\times2$ subtensors and, in each
iteration, maximizes the sum of squares of its diagonal entries. We show how
the rotation angles are calculated and prove convergence of the algorithm.
Different initializations of the algorithm are discussed, as well as the
special cases of symmetric and antisymmetric tensors. The algorithm can be
generalized to work on higher-order tensors.
