# genericSymmetricMatrix -- make a generic symmetric matrix

## Synopsis

• Usage:
genericSymmetricMatrix(R,r,n)
• Inputs:
• R, a ring
• r, , which is a variable in the ring R (this input is optional)
• n, an integer
• Outputs:
• , a symmetric matrix with n rows whose entries on and above the diagonal are the variables of R starting with r

## Description

A square matrix M is symmetric if transpose(M) - M == 0.
 `i1 : R = ZZ[a..z];` ```i2 : M = genericSymmetricMatrix(R,a,3) o2 = | a b c | | b d e | | c e f | 3 3 o2 : Matrix R <--- R``` ```i3 : transpose(M) - M == 0 o3 = true``` ```i4 : genericSymmetricMatrix(R,d,5) o4 = | d e f g h | | e i j k l | | f j m n o | | g k n p q | | h l o q r | 5 5 o4 : Matrix R <--- R```

Omitting the input r is the same as having r be the first variable in R.

 ```i5 : genericSymmetricMatrix(R,3) o5 = | a b c | | b d e | | c e f | 3 3 o5 : Matrix R <--- R``` ```i6 : genericSymmetricMatrix(R,5) o6 = | a b c d e | | b f g h i | | c g j k l | | d h k m n | | e i l n o | 5 5 o6 : Matrix R <--- R```