Diagonal matrix is a type of square matrix in which all the diagonal elements are present and non-diagonal elements are zero. Diagonal elements are those elements for which row number is equal to the column number i.e. i = j.
So, A3x3 = $\begin{bmatrix}
a &0 &0 \\
0 &b &0 \\
0 &0 &c
\end{bmatrix}$
In the above matrix A, it is clear that all non-diagonal elements are 0 and diagonal elements are present. So, A is a diagonal matrix.

To know about Block Diagonal Matrix, first we have to know about Block Matrix.

Block Matrix: A block matrix is a matrix which is split into blocks. These blocks are nothing but the smaller matrices and formed by grouping the elements in adjacent rows or columns or if a matrix is define in terms of smaller matrices adjacent rows and columns.
Let E = $\begin{bmatrix}
2 &2 &1 &1 \\
2 &2 &1 &1 \\
4 &4 &3 &3 \\
4 &4 &3 &3
\end{bmatrix}$ be any matrix. It can be partitioned into 4 x 2 blocks as follows:

E11 = $\begin{bmatrix}
2 &2 \\
2 &2
\end{bmatrix}$

E12 = $\begin{bmatrix}
1 &1 \\
1 &1
\end{bmatrix}$

E21 = $\begin{bmatrix}
4 &4 \\
4 &4
\end{bmatrix}$

E22 = $\begin{bmatrix}
3 &3 \\
3 &3
\end{bmatrix}$

So, E = $\begin{bmatrix}
E_{11} &E_{12} \\
E_{21} &E_{22}
\end{bmatrix}$ is the block matrix.

So, we can say if A is i x j order matrix and k and l are numbers such that 1 < k < i and 1 < l < j, then we can form a block matrix with its elements C, D, E and F as follows:

A = $\begin{bmatrix}
C &D \\
E &F
\end{bmatrix}$

Block Diagonal Matrix: A block diagonal matrix is a type of square matrix such that if a block matrix is formed from this square matrix then, its diagonal is an arrangement of square matrices and the non-diagonal blocks or sub-matrices are zero matrices.
Diagonal Matrix
Here, Cn x n is a block diagonal matrix of order n x n. Thus, C is a block diagonal matrix if $C_{\alpha \beta }$ = 0, where $\alpha = \beta$.