Solve and other functions such as FindInstance, NSolve, and NDSolve return a list of rules. In the Wolfram Language, rules associate symbols with values. For example, consider the output of:

roots = Solve[x^2 + 4 x - 1 == 0, x]
{{x -> -2 - Sqrt[5]}, {x -> -2 + Sqrt[5]}}

The output is a list of lists of rules. Each sublist represents a possible value of x. To look at the first solution as a rule, we can run:

{x -> -2 - Sqrt[5]}

The symbol is x, and its value is - 2 - Sqrt[5]. The ReplaceAll command ( /. ) replaces every instance of the symbol with a value according to a rule. For example, if we want to replace all instances of x in the polynomial x^2 + 4 x - 1 with the first root of the polynomial above, we could write:

x^2 + 4 x - 1 /. roots[[1]]

This results in an expression that is equal to zero.

If we want to get the second root of the polynomial and assign it to a new variable called secondRoot, we could evaluate:

secondRoot = x /. roots[[2]]

Please see the tutorial on using rules for more examples and information on how to use them.

For some functions, such as NDSolve, an equivalent “Value” function exists (e.g., NDSolveValue) that returns a value or function instead of rules.