# Convert List to Matrix [closed]

I have the lists in matrix form, as shown in the screenshot fig.2 below. I would like to convert it to pure matrix like fig.1

Edited: For example:

 (\!$$\* TagBox[GridBox[{ { RowBox[{"{", RowBox[{"1", ",", "2", ",", "3"}], "}"}]}, { RowBox[{"{", RowBox[{"4", ",", "5", ",", "6"}], "}"}]}, { RowBox[{"{", RowBox[{"7", ",", "8", ",", "9"}], "}"}]} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997], { Offset[0.5599999999999999]}, Offset[0.27999999999999997]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Column]$$)


Fig.1

Fig.2

• Remove MatrixForm from fig 2, and just do mat = {list1,list2,....,listn} should do it. But it is better to post the plain text Mathematica code you used to generate this. Jun 21 at 19:39
• Without something other users can copy to their Mathematica session, we can't help you. Jun 21 at 19:40
• I edited the question, thanks! Jun 21 at 20:34
• As already suggested, just remove MatrixForm from the code that created your expression in the question. If, however, all you have is that expression, copy it into an In line and execute it. Jun 21 at 22:24

Clear["Global*"]

Note that the MatrixForm wrapper is isolated from the definition of the matrix mat by the parentheses. This facilitates subsequent calculations with the matrix.
Tr@mat === Simplify@Total@Eigenvalues@mat
`