# Storing Multiple solutions from Solve as rows of a matrix

I am trying to find all the solutions to a Diophantine equation (only integer valued solutions) using Solve[], however there are multiple and even many solutions sometimes.

How can I store these individual solutions as rows of a matrix?

When I apply the rules to the variables, and then display as table, or matrix, and then get the dimension of the resulting "table", it appears that it is just one long vector, and not a matrix as it appears.

For example: Solve[2/3-1/x-1/y-1/z==0 &&x>=1 &&y>=x &&z>=y,{x,y,z},Integers]. This produces 8 solutions of the form (x,y,z). So I would like each solution to be an individual row in an 8x3 matrix.

• Solve[2/3 - 1/x - 1/y - 1/z == 0 && x >= 1 && y >= x && z >= y, {x, y, z}, Integers][[All, All, 2]], maybe? Commented Jul 19, 2017 at 15:06

$\left( \begin{array}{ccc} 2 & 7 & 42 \\ 2 & 8 & 24 \\ 2 & 9 & 18 \\ 2 & 10 & 15 \\ 2 & 12 & 12 \\ 3 & 4 & 12 \\ 3 & 6 & 6 \\ 4 & 4 & 6 \\ \end{array} \right)$