I would creat a symmetric matrix, but how can I set the boundary in Subscript
?
Array[Subscript[a, #1, #2] &, {3, 3}] // MatrixForm
$a_{ij} = a_{ji}$, $j$ is not equal to $i$.
I would creat a symmetric matrix, but how can I set the boundary in Subscript
?
Array[Subscript[a, #1, #2] &, {3, 3}] // MatrixForm
$a_{ij} = a_{ji}$, $j$ is not equal to $i$.
Array[Subscript[a, ## & @@ Sort[{##}]] &, {5, 5}] // MatrixForm // TeXForm
$\left( \begin{array}{ccccc} a_{1,1} & a_{1,2} & a_{1,3} & a_{1,4} & a_{1,5} \\ a_{1,2} & a_{2,2} & a_{2,3} & a_{2,4} & a_{2,5} \\ a_{1,3} & a_{2,3} & a_{3,3} & a_{3,4} & a_{3,5} \\ a_{1,4} & a_{2,4} & a_{3,4} & a_{4,4} & a_{4,5} \\ a_{1,5} & a_{2,5} & a_{3,5} & a_{4,5} & a_{5,5} \\ \end{array} \right)$
You can also use
Array[Subscript[a, Min @ ##, Max @ ##] &, {5, 5}]