Outer automorphism of SLn
Solution 1:
One way to describe this automorphism is as $X\mapsto f^{-1}(X^T)^{-1}f$, where $f=\operatorname{antidiag}(1,\ldots,1,-1,\ldots,-1)$. The matrix $f$ is exactly the Gram matrix of the form to be preserved by the elements of the symplectic group.
Note that the automorphisms are uniquely determined by their action on the generators, and in case of Chevalley groups one has to check if a bijection preserves a very few relations, see Section 12.2 of "Simple groups of Lie type" by R. W. Carter. So it is often easier to look at the generators and relations rather than the matrices.