# Looking for an concise expression that extracts values from results returned form Solve

I solved a linear system which returned:

{{A[0, 0] -> 0, A[0, 1] -> 0, A[0, 2] -> 1, A[0, 3] -> 4,
A[0, 4] -> 5, A[0, 5] -> 2, A[0, 6] -> 0, A[1, 0] -> 0,
A[1, 1] -> 10/3, A[1, 2] -> 10, A[1, 3] -> 20/3, A[1, 4] -> 0,
A[1, 5] -> 0, A[1, 6] -> 0, A[2, 0] -> 1, A[2, 1] -> 16/3,
A[2, 2] -> 10, A[2, 3] -> 20/3, A[2, 4] -> 0, A[2, 5] -> 0,
A[2, 6] -> 0, A[3, 0] -> 2, A[3, 1] -> 4, A[3, 2] -> 0,
A[3, 3] -> 0, A[3, 4] -> 0, A[3, 5] -> 0, A[3, 6] -> 0,
A[4, 0] -> 1, A[4, 1] -> 2, A[4, 2] -> 0, A[4, 3] -> 0,
A[4, 4] -> 0, A[4, 5] -> 0, A[4, 6] -> 0}}


Is it possible in one or two lines to create and assign directly thoose values to the variable A[i,j]?

I have read some questions about how to get values from solve but people often want to renames the variables or only extract a part of the solution so that's probably why the solution takes lines.

Isn't it possible to directly extract the answer in one simple line?

rules =
{{A[0, 0] -> 0, A[0, 1] -> 0, A[0, 2] -> 1, A[0, 3] -> 4,
A[0, 4] -> 5, A[0, 5] -> 2, A[0, 6] -> 0, A[1, 0] -> 0,
A[1, 1] -> 10/3, A[1, 2] -> 10, A[1, 3] -> 20/3, A[1, 4] -> 0,
A[1, 5] -> 0, A[1, 6] -> 0, A[2, 0] -> 1, A[2, 1] -> 16/3,
A[2, 2] -> 10, A[2, 3] -> 20/3, A[2, 4] -> 0, A[2, 5] -> 0,
A[2, 6] -> 0, A[3, 0] -> 2, A[3, 1] -> 4, A[3, 2] -> 0,
A[3, 3] -> 0, A[3, 4] -> 0, A[3, 5] -> 0, A[3, 6] -> 0,
A[4, 0] -> 1, A[4, 1] -> 2, A[4, 2] -> 0, A[4, 3] -> 0,
A[4, 4] -> 0, A[4, 5] -> 0, A[4, 6] -> 0}};

Set @@@ rules[[1]];
Definition @ A


• Rather than Definition@A, recommend Array[A, {5, 7}, {0, 0}] // MatrixForm Jun 17, 2017 at 20:04