I have the following self-explanatory question.
As seen from the above matrices, I start with the "original" matrix, which is a symmetric matrix, meaning that first row and first column represent the same variable, say
X, and 2nd row and 2nd column represent the variable
Z, W, V. I first want to move 2nd row in the "original" matrix to 4th row. This operation is shown in the matrix denoted by
r24. After this operation, I want to do the same operation on the same columns, meaning that I want to move 2nd column to 4th column as shown in
c24. All of these operations are shown with the colored text. The resulting final matrix, which I aim to create,
c24, should be symmetric with respect to the variable names. It means that the final matrix has the ordered variable names as
X, Z, W, Y, V in columns and rows. In fact, if the above two operations are done correctly, the order of the variables in rows and columns will remain identical.
I like to do all the operations using a Mathematica function such as
f[original, 2, 4] to create the final matrix
Thank you all.