next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: genericSymmetricMatrix

genericSymmetricMatrix -- make a generic symmetric matrix

Synopsis

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

See also

Ways to use genericSymmetricMatrix :