Symmetric Matrix

    Introduction

    In the most simplest terms, we can define a matrix as an array of numbers arranged in rows and columns. A matrix for which the number of rows is the same as the number of columns is called a square matrix. Ans a symmetric matrix is defined as a square matrix that is equivalent to its transpose matrix. The transpose of a matrix is simply a flipped version of the original matrix. We can transpose a matrix by switching its rows with its columns. Symmetric matrices are super handy, especially in machine learning.

    Let's break it down: if you have a `3 times 3` symmetric matrix and you flip it over its diagonal, the numbers still match up perfectly. That's the magic of symmetry! These matrices play a big role in many mathematical applications, particularly in data analysis and optimization problems.

     

    What Is Symmetric Matrix?

    A symmetric matrix is a special type of square matrix in linear algebra. It's called "symmetric" because it remains the same when you swap its rows and columns. In other words, if you take the transpose of a symmetric matrix, you get the same matrix back. The transpose matrix of any given matrix, say `A`, can be written as `A^T`. A symmetric matrix `X`, can thus be represented as, `X = X^T`.

    Let’s consider a symmetric matrix \( X = [X_{ij}]_{n \times n} \)

    For the matrix `X`, \( x_{ij} = x_{ji} \)  for all `i` and `j` where `1 \leq i \leq n` and `1 \leq j \leq n`. 

    For instance, if you have a `3 times 3` symmetric matrix, the element in the first row and second column must be the same as the element in the second row and first column. The same rule applies to all corresponding elements across the diagonal. 

    So, in a symmetric matrix, the element in the `i`th row and `j`th column is equal to the element in the `j`th row and `i`th column. This symmetry of a matrix holds for all elements in the matrix.

     

    Example of Symmetric Matrices

    Example of `2 × 2` Symmetric Matrix:

    Consider the following `2 × 2` symmetric matrix:

    \( P = \begin{bmatrix} 2 & 5 \\ 5 & 3 \end{bmatrix} \)

    When you transpose this matrix, you get:

    \( P^T = \begin{bmatrix} 2 & 5 \\ 5 & 3 \end{bmatrix} \)

     

    Example of `3 × 3` Symmetric Matrix:

    Now, let's examine a `3 × 3` symmetric matrix:

    \( B = \begin{bmatrix} 4 & 1 & 6 \\ 1 & 8 & 7 \\ 6 & 7 & 9 \end{bmatrix} \)

    Upon transposition, it remains unchanged:

    \( B^T = \begin{bmatrix} 4 & 1 & 6 \\ 1 & 8 & 7 \\ 6 & 7 & 9 \end{bmatrix} \)

     

    Properties of Symmetric Matrix

    • A symmetric matrix must be square, meaning it has an equal number of rows and columns.
    • When you add or subtract two symmetric matrices, the result is always symmetric.
    • The product of two symmetric matrices, `AB` and `BA`, may or may not be symmetric. `AB` is symmetric only if `A` and `B` commute, meaning `AB = BA`.
    • If a matrix `A` is symmetric, then its powers `A^n` are also symmetric for any integer `n`.
    • The eigenvalues of a symmetric matrix are always real and positive.
    • For a symmetric matrix, its determinant is the same as that of its transpose.
    • The adjoint of a symmetric matrix is symmetric.
    • If the inverse of a symmetric matrix `B` exists, then the inverse `B^(-1)` is also symmetric.
    • The transpose of `A` multiplied by `A`, denoted as `A`. `A^T`, is always symmetric.
    • Multiplying a symmetric matrix by a scalar results in another symmetric matrix.

     

    Symmetric Matrix Theorems

    In order to understand the theorems, let’s first know about skew-symmetric matrices. A matrix is said to be a skew-symmetric matrix if it is a square matrix and the transpose of the matrix is equivalent to the negative of that matrix, i.e. If `P` is a skew-symmetric matrix, then `P^T  = - P`.

    Theorem `1`: When you add a square matrix `B` to its transpose, `B + B^T`, the result is a symmetric matrix. Similarly, subtracting the transpose from the original matrix, `B - B^T`, yields a skew-symmetric matrix.

    Proof: Let `A = B + B^T`. Transposing `A`, we get `A^T = B^T + (B^T)^T = B^T + B = B + B^T = A`, showing that `B + B^T` is symmetric. Now, let `C = B - B^T`. The transpose of `C` is `C^T` `= B^T - (B^T)^T` `= B^T - B` `= - (B - B^T) = - C`, indicating that `B - B^T` is skew-symmetric.

     

    Theorem `2`: Any square matrix can be expressed as the sum of a symmetric matrix and a skew-symmetric matrix using the formula: `B = (1/2) × (B + B^T) + (1/2) × (B - B^T)`. 

    Example: Consider matrix `B`:

    \( B = \begin{bmatrix} 5 & 2 & -1 \\ 2 & 3 & 4 \\ -1 & 4 & 6 \end{bmatrix} \)

    By applying the theorem, we can express `B` as the sum of a symmetric matrix and a skew-symmetric matrix:

    \( \frac{1}{2} \times (B + BT) = \frac{1}{2} \times \begin{bmatrix} 10 & 4 & -2 \\ 4 & 6 & 8 \\ -2 & 8& 12 \end{bmatrix} \)

    \( = \begin{bmatrix} 5 & 2 & -1 \\ 2 & 3 & 4 \\ -1 & 4 & 6 \end{bmatrix} \)

    \( \frac{1}{2} \times (B - BT) = \frac{1}{2} \times \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & -1 & 0 \end{bmatrix} \)

    \( = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0.5 \\ 0 & -0.5 & 0 \end{bmatrix} \)

    So, `B` can be expressed as the sum of a symmetric matrix and a skew-symmetric matrix.

     

    Solved Examples

    Example `1`: Determine if the following matrices are symmetric.

    a)  \( G = \begin{bmatrix} 2 & 1 & 5 \\ 1 & 0 & -3 \\ 5 & -3 & 4 \end{bmatrix} \)

    b)  \( H = \begin{bmatrix} 3 & 6 & 9 \\ 6 & 1 & 8 \\ 9 & 4 & 5 \end{bmatrix} \)

    Solution:

    a) For matrix `G`:

    \( G^T = \begin{bmatrix} 2 & 1 & 5 \\ 1 & 0 & -3 \\ 5 & -3 & 4 \end{bmatrix} \)

    Since \( G^T = G \), matrix `G` is symmetric.

    b) For matrix `H`:

    \( H^T = \begin{bmatrix} 3 & 6 & 9 \\ 6 & 1 & 4 \\ 9 & 8 & 5 \end{bmatrix} \)

    Since \( H^T \neq H \), matrix `H` is not symmetric.

    Matrix `G` is symmetric while matrix `H` is not.

     

    Example `2`: Given that the below matrix is a symmetric matrix, find `a` and `b`.

     \( A = \begin{bmatrix} 1 & 1 & 3 \\ 2 & 0 & a + 3 \\ b - 4 & 2 & 5 \end{bmatrix} \)

    Solution:

    As the given matrix is symmetric `A = A^T`

    Hence

    \( \begin{bmatrix} 1 & 1 & 3 \\ 2 & 0 & a + 3 \\ b - 4 & 2 & 5 \end{bmatrix} = \begin{bmatrix} 1 & 2 & b-4 \\ 1 & 0 & 2 \\ 3 & a + 3 & 5 \end{bmatrix} \)

    Comparing the corresponding elements, we get

    `b - 4 = 3` which gives `b = 7`

    `a + 3 = 2` which gives `a =-1`

    Hence, `a = -1` and `b = 7`.

     

    Example `3`: If we have a symmetric matrix, say `C`, then verify that \( C^T = C \).

    Solution:

    Let's consider the following symmetric matrix:

    \( C = \begin{bmatrix} 4 & 2 & 3 \\ 2 & 7 & 5 \\ 3 & 5 & 6 \end{bmatrix} \)

    Now, let's find its transpose:

    \( C^T = \begin{bmatrix} 4 & 2 & 3 \\ 2 & 7 & 5 \\ 3 & 5 & 6 \end{bmatrix} \)

    Since \( C^T = C \), we can conclude that matrix `C` is symmetric.

     

    Example `4`: Determine if the matrix is symmetric.

    \( {B = \begin{bmatrix} 2 & -1 & 0 \\ -1 & 4 & 3 \\ 0 & 3 & 1 \end{bmatrix}} \)

    Solution:

    As \( B = \begin{bmatrix} 2 & -1 & 0 \\ -1 & 4 & 3 \\ 0 & 3 & 1 \end{bmatrix} \), and Transpose of matrix `B`, denoted as \( B^T = \begin{bmatrix} 2 & -1 & 0 \\ -1 & 4 & 3 \\ 0 & 3 & 1 \end{bmatrix} = B \).

    Therefore, the given matrix is symmetric.

     

    Example `5`: Determine if the matrix can be considered as an example for symmetric matrix.

    \( {D = \begin{bmatrix} 4 & 3 \\ 2 & 1 \end{bmatrix}} \)

    Solution:

    Given \( {D = \begin{bmatrix} 4 & 3 \\ 2 & 1 \end{bmatrix}} \),

    and \( {D^T = \begin{bmatrix} 4 & 2 \\ 3 & 1 \end{bmatrix}} \neq D \).

    Thus, the matrix provided is not a symmetric matrix example.

     

    Practice Problems

    Q`1`. Determine if the following matrix is symmetric:

    \( {A = \begin{bmatrix} 4 & 2 & 3 \\ 2 & 5 & 1 \\ 3 & 1 & 6 \end{bmatrix}} \)

    1. Yes  
    2. No  
    3. Cannot be determined  
    4. None of the above  

    Answer: a

     

    Q`2`. Is the matrix given below symmetric?

    \( {B = \begin{bmatrix} -1 & 0 & 2 \\ 0 & 3 & 4 \\ 2 & 4 & 1 \end{bmatrix}} \)

    1. Yes  
    2. No  
    3. Cannot be determined  
    4. None of the above  

    Answer: a

     

    Q`3`. Is the given matrix symmetric?

    \( {C = \begin{bmatrix} 2 & 1 & 4 \\ 1 & 0 & 3 \\ 4 & 3 & -2 \end{bmatrix}} \)

    1. Yes  
    2. No  
    3. Cannot be determined  
    4. None of the above  

    Answer: a

     

    Q`4`.Determine if the matrix is symmetric:

    \( {D = \begin{bmatrix} 3 & -2 & 1 \\ -2 & 6 & 5 \\ 1 & 8 & 9 \end{bmatrix}} \)

    1. Yes  
    2. No  
    3. Cannot be determined  
    4. None of the above  

    Answer: b

     

    Q`5`. Check if the given matrix is symmetric:

    \( {E = \begin{bmatrix} 1 & 5 & 3 \\ 2 & 4 & 2 \\ 3 & 2 & 5 \end{bmatrix}} \)

    1. Yes  
    2. No  
    3. Cannot be determined  
    4. None of the above  

    Answer: b

     

    Frequently Asked Questions

    Q`1`. What does it mean for a matrix to be symmetric?

    Answer: A symmetric matrix is a square matrix that is equal to its transpose. In other words, if you reflect a symmetric matrix along its main diagonal, the resulting matrix is identical to the original matrix.

     

    Q`2`. How can you determine if a matrix is symmetric?

    Answer: To determine if a matrix is a symmetrical matrix, calculate its transpose. If the transpose is equal to the original matrix, then the matrix is symmetric.

     

    Q`3`. What are the properties of symmetric matrices?

    Answer: Some symmetric matrix properties include:

    `1`. The sum and difference of two symmetric matrices result in symmetric matrices.

    `2`. Scalar multiplication of a symmetric matrix yields another symmetric matrix.

    `3`. The eigenvalues of a symmetric matrix are always real.

    `4`. The determinant of a symmetric matrix is the same as the determinant of its transpose.

     

    Q`4`. Can a non-square matrix be symmetric?

    Answer: No, a non-square matrix cannot be symmetric. Symmetric matrices are only defined for square matrices where the number of rows is equal to the number of columns.

     

    Q`5`. Are all diagonal matrices symmetric?

    Answer: Yes, all diagonal matrices are symmetric. This is because diagonal matrices have non-zero elements only along the main diagonal, and the transpose of a diagonal matrix is itself. Therefore, diagonal matrices satisfy the definition of symmetric matrices.