# The Representation of Equations and Solutions

The Wolfram System treats equations as logical statements. If you type in an equation like x^2+3x==2, the Wolfram System interprets this as a logical statement that asserts that x^2+3x is equal to 2. If you have assigned an explicit value to x, say x=4, then the Wolfram System can explicitly determine that the logical statement x^2+3x==2 is False.

If you have not assigned any explicit value to x, however, the Wolfram System cannot work out whether x^2+3x==2 is True or False. As a result, it leaves the equation in the symbolic form x^2+3x==2.

You can manipulate symbolic equations in the Wolfram System in many ways. One common goal is to rearrange the equations so as to "solve" for a particular set of variables.

Here is a symbolic equation:
 In:= Out= You can use the function Reduce to reduce the equation so as to give "solutions" for x. The result, like the original equation, can be viewed as a logical statement:
 In:= Out= The quadratic equation x^2+3x==2 can be thought of as an implicit statement about the value of x. As shown in the example above, you can use the function Reduce to get a more explicit statement about the value of x. The expression produced by Reduce has the form x==r1||x==r2. This expression is again a logical statement, which asserts that either x is equal to r1, or x is equal to r2. The values of x that are consistent with this statement are exactly the same as the ones that are consistent with the original quadratic equation. For many purposes, however, the form that Reduce gives is much more useful than the original equation.

You can combine and manipulate equations just like other logical statements. You can use logical connectives such as || and && to specify alternative or simultaneous conditions. You can use functions like LogicalExpand, as well as FullSimplify, to simplify collections of equations.

For many purposes, you will find it convenient to manipulate equations simply as logical statements. Sometimes, however, you will actually want to use explicit solutions to equations in other calculations. In such cases, it is convenient to convert equations that are stated in the form lhs==rhs into transformation rules of the form lhs->rhs. Once you have the solutions to an equation in the form of explicit transformation rules, you can substitute the solutions into expressions by using the /. operator.

Reduce produces a logical statement about the values of x corresponding to the roots of the quadratic equation:
 In:= Out= ToRules converts the logical statement into an explicit list of transformation rules:
 In:= Out= You can now use the transformation rules to substitute the solutions for x into expressions involving x:
 In:= Out= The function Solve produces transformation rules for solutions directly:
 In:= Out= 