Symmetric matrix 10 x 10

1.5k Views Asked by At

Can You give me the example of symmetric matrix 10 x 10.

Or if You know online symmetric matrix generator then give me the links. I tried to make this with Wolfram Mathematica but I did not find a solution

Thanks a lot !

3

There are 3 best solutions below

0
On BEST ANSWER

You can do this easily with pen and paper. The algorithm is the following

  1. Write down 10 numbers in a row
  2. Beneath the $i$-th number (counting from $1$), write down a column of $10-i$ numbers
  3. You've now found a lower triangular matrix
  4. Complete the matrix to a symmetric matrix by copying the $j$-th number in the $i$-th row (if there is already such a number) to the $i$-th column of the $j$-th row (if there isn't already a number there).
  5. Draw a large opening parenthesis to the left, and a large closing parenthesis to the right of your array of $10 \times 10$ numbers.
  6. Ponder the fact that you could have easily figured this out yourself, had you bothered to look up the definition of a symmetric matrix.

(6) is the most important part of the algorithm.

6
On

Note that if $A$ is a square matrix, then $A+A^T$ is always symmetric where $T$ denotes transpose. In fact, $\frac{A+A^T}{2}$ is known as the symmetric part of $A$ (and $\frac{A-A^T}{2}$ the anti-symmetric part of $A$, and $A$ is the sum of its symmetric and antisymmetric parts).

In Matlab, you can use the following commands to get a random symmetric matrix:

A=randn(10); matrix=A+A.';

[Of course, diagonal matrices are always symmetric, so you could do diag(randn(10,1)) or something as well to get a diagonal matrix with random Gaussian entries on the diagonal].

There is also sprandsym in matlab if you want sparse random symmetric matrices.

1
On

I don't know whether it's useful for you but I remember a matlab code for generating random symmetric positive definite matrix given in How to generate random symmetric positive definite matrices using MATLAB?