# How to make a matrices of matrices (or block matrix)

I'm trying to construct a matrix H[i,j] that satisfies the "If" condition, in this case, if i==f then the main diagonal has a matrix stored, and also, the other non diagonal terms that are matrices too. How to return the full H[i,j] matrix from this loop?

   n = 2;
\[Epsilon] = \[CapitalAlpha];

For[j = 0, j < n + 1, j++,
For[i = 0, i < n + 1, i++,
If[i == j,

Subscript[H, i, j] =
Table[If[i == j - 1, t, 0], {i, 1, n}, {j, 1, n}] +
Table[If[i == j + 1, t, 0], {i, 1, n}, {j, 1, n}] +
Table[If[i == j, \[Epsilon], 0], {i, 1, n}, {j, 1, n}]
,

Subscript[H, i, j] = t*IdentityMatrix[n]             ];
];

];


n = 2;
ArrayFlatten[
Table[
If[i == j,
Table[t Boole[Abs[i - j] == 1] + ϵ Boole[i == j], {i, 1, n}, {j, 1, n}],
t IdentityMatrix[n]
],
{i, 1, n}, {j, 1, n}]
]


Try this:

Array[Subscript[H, ##] &, {n, n}]


BTW, I am almost certain that there are more convenient ways to define your H.