If $G=G_1\times\dots\times G_n$ for abelian $G_i$, then ${\rm Aut}(G)$ is isomorphic to a specific general linear group. This is Exercise 1.5.10 of Robinson's, "A Course in the Theory of Groups (Second Edition)". According to Approach0, it is new to MSE.
The Details:
On page 11, ibid., the set product of subsets $X,Y$ of a group is defined as
$$XY=\{xy\mid x\in X, y\in Y\}.$$
On page 17, ibid., for groups $G,H$, the definition of ${\rm Hom}(G, H)$ is given as the set of all homomorphisms from $G$ to $H$.
The definition of a direct product on pages 20 to 21, ibid., is a little more involved.

Let $\{G_\lambda\mid \lambda\in\Lambda\}$ be a given set of groups. The cartesian (or unrestricted direct) product,
$$C=\underset{\lambda\in\Lambda}{{\rm Cr}}\, G_\lambda,$$
is the group whose underlying set is the set product of the $G_\lambda$s [. . .] and whose group operation is multiplication of components: thus
$$(g_\lambda)(h_\lambda)=(g_\lambda h_\lambda),$$
$g_\lambda, h_\lambda\in G_\lambda$. [. . .]
The subset of all $(g_\lambda)$ such that $g_\lambda=1_\lambda$ for almost all $\lambda$ [. . .] is called the external direct product,
$$D=\underset{\lambda\in\Lambda}{{\rm Dr}}\, G_\lambda,$$
[. . .] In case $\Lambda=\{\lambda_1,\dots,\lambda_n\}$, a finite set, we write
$$D=G_{\lambda_1}\times\dots\times G_{\lambda_n}.$$
Of course $C=D$ in this case.

On page 26, ibid., we have that

The set of all automorphisms of [a group] $G$ is denoted by
$${\rm Aut}(G).$$

It is a group under function composition.
The Question:
This is on page 30, ibid.

Let $G=G_1\times\dots\times G_n$ where the $G_i$ are abelian groups. Prove that ${\rm Aut}(G)$ is isomorphic with the group of all invertible $n\times n$ matrices whose $(i,j)$ entries belong to ${\rm Hom}(G_i, G_j)$, the usual matrix product being the group operation.

Thoughts:
I'm used to thinking of the direct product of groups as the group defined by a certain presentation, or else simply as the obvious generalisation of $$H\times K=\{(h,k)\mid h\in H, k\in K\}$$ under the operation $(h,k)\cdot(h',k')=(hh', kk')$.
My linear algebra is a little rusty, which is probably why I'm struggling here.

Examples:
When $n=1$:
We have just the abelian group $G$. The automorphism group is
$${\rm Aut}(G)=\{\varphi\in {\rm Hom}(G,G)\mid \varphi \text{ is an isomorphism}\}$$
and the $1\times 1$ matrices are simply $(\varphi)$ with $(\varphi)^{-1}=(\varphi^{-1})$.
The isomorphism is trivial.
When $n=2$:
We have $G=G_1\times G_2$. Now the $(i,j)$ entries of the $2\times 2$ matrices are such that . . .
Wait a Minute . . .

What operation is the addition of the homomorphisms?

I guess this is my main stumbling block.
Let's try working it out & see . . .
So, we have
$${\rm Aut}(G)\stackrel{?}{\cong}\left\{
\begin{pmatrix}
\varphi_{(1,1)} & \varphi_{(1,2)}\\
\varphi_{(2,1)} & \varphi_{(2,2)}
\end{pmatrix} : \varphi_{(1,1)}\stackrel{?}{\times}\varphi_{(2,2)}\stackrel{?}{-} \varphi_{(1,2)}\stackrel{?}{\times}\varphi_{(2,1)}\neq \stackrel{?}{0} \right\}.$$
Okay, so I'm not sure on multiplication either, nor am I sure of what the zero element is.
This is a mess. I'm sorry.
Please help :)
 A: Hints:

*

*When $G$ is any group and $B$ is an abelian group, then $\mathrm{Hom}(G,B)$ is more than just a set, it is actually an abelian group. The operation is "pointwise addition", so that $(f+g)(a) = f(a)+g(a)$ for all $a\in G$. This is a homomorphism as well, since
$$\begin{align*}
(f+g)(a+a') &= f(a+a') + g(a+a')\\
&= f(a)+f(a') + g(a)+g(a')\\
&= f(a)+g(a)+f(a')+g(a')\\
&= (f+g)(a)+(f+g)(a').
\end{align*}$$
The identity element of this abelian group is the zero map, sending everything to $0_B$, and the additive inverse of $f$ is the function $g(a)=-f(a)$ for all $a\in A$. (When $G=B$, this is actually a ring, with the multiplication being composition of functions).


*For any family of groups $\{G_i\}_{i\in I}$, a morphism $f$ from a group $H$ into the direct product $\prod_{i\in I}G_i$ is equivalent to a family of morphisms $\{f_i\}_{i\in I}$, with $f_i\colon H\to G_i$. This is the universal property of the product: given the family $\{f_i\}_{i\in I}$, there exists a unique morphism $F\colon H\to \prod G_i$ such that $f_i =\pi_i\circ F$, where $\pi_i$ is the projection onto the $i$th coordinate. Namely, $F(h) = (f_1(h),\ldots,f_n(h))$.


*For a finite family of abelian groups, we also have maps going the other way. The embeddings $\iota_i\colon A_i\to \prod_{j\in J}A_j$ that sends $a\in A_i$ to the element of the product that has $a$ in the $i$th coordinate and $0$s in all the other coordinates have the following universal property: given any abelian group $K$, and given any morphisms $g_i\colon A_i\to K$ for each $i$, there exists a unique morphism $G\colon \prod A_i\to K$ such that $g_i = G\circ \iota_i$ for each $i$. Namely, $G(a_1,\ldots,a_n) = g_1(a_1)+\cdots + g_n(a_n)$. Thus, maps from a finite direct product of abelian groups are equivalent to a family of maps from the factors.
Putting those together, it should be clear that any homomorphism $G_1\times\cdots\times G_n\to G_1\times\cdots\times G_n$ corresponds to a family of morphisms $\varphi_{ij}\colon G_j\to G_i$. You should then verify that if you arrange them in a matrix in the "obvious" way, and what the corresponding morphism is, then the image of an element $(g_1,\ldots,g_n)$ under the corresponding morphism $\varphi\colon G_1\times\cdots\times G_n\to G_1\times\cdots\times G_n$ is given by computing
$$\left(\begin{array}{ccc}
\varphi_{11}& \cdots & \varphi_{1n}\\
\vdots & \ddots & \vdots \\
\varphi_{n1} & \cdots & \varphi_{nn}
\end{array}\right)
\left(\begin{array}{c}
g_1\\ \vdots\\ g_n\end{array}\right).$$
That will give you a description of the homomorphisms. It also tells you that the composition of homomorphisms "should" correspond to matrix multiplication. And that will tell you exactly when a homomorphism is actually an automorphism.
A: Given an abelian group $G$ noted additively (or more generally a module over any ring), its endomorphisms form a ring $\text{End}(G)$ under pointwise addition ($(\phi+\psi)(x)=\phi(x)+\psi(x)$ and composition (you can check the axioms yourself; distributivity follow from the functions being morphisms). An automorphism is an invertible endorphism, so $\text{Aut}(G)$ is the Group of units of $\text{End}(G)$.
Now, you just want to represent an endomorphism of the direct sum $G_1\oplus \cdots \oplus G_n$ with a matrix (direct sum is the same as direct product in this case but its more common to talk about sums when working with abelian groups/modules and it makes clearer the analogy with linear algebra).
You can see elements of $G_1\oplus \cdots \oplus G_n$ as column vectors with an element of $G_i$ in the $i$'th coordinate.
Then a matrix of endomorphisms acts on such column vectors just by usual matrix multiplication. For example when $n=2$:
$$\left(\begin{array}{ccc}
\varphi_{11} & \varphi_{12}\\
\varphi_{21} & \varphi_{22}
\end{array}\right)
\left(\begin{array}{c}
x_1\\ x_2\end{array}\right)=\left(\begin{array}{c}
\varphi_{11}(x_1) + \varphi_{12}(x_2)\\ \varphi_{21}(x_1) + \varphi_{22}(x_2)\end{array}\right)$$
It's not too hard to show that all endormorphims can be written in matrices. The proof is very similar to the analogous result in linear algebra that every linear map is given by a matrix.
