Of course! Using algebra can get you an answer much faster than trial and error for the more difficult equations.
The basic idea is to place a variable in front of each compound or element in the equation. One variable can arbitrarily be assigned a value of 1.
Then work out the equations for each element using the other variables, and solve the equations. For example, for a simple reaction for water, use the variables x, y, and z (the letters chosen don't matter):
x H2 + y O2 --> z H2O
For Hydrogen, you get the equation 2x = 2z
For Oxygen, you get the equation 2y = z
You can pick any variable to assign a value of 1. Let's pick x. If x=1, 2=2z, so z=1.
If z=1, then 2y=1, so y=1/2.
With values for your variables, you can plug them back into the equation to get
1 H2 + 1/2 O2 --> 1 H2O
This equation is correct, however, most of the time chemical equations are written out using whole numbers. Since this involves fractions, you'll want to multiply all of the coefficients (in this case by 2). This will give you:
2 H2 + O2 --> 2 H2O
More examples can probably be found on the web looking for the algebraic method to solve chemical equations.