Game Development Reference
In-Depth Information
If you work with a set of three equations with three variables for which you want
to find values, you might start with this set of equations:
x y þ
5
z ¼
6
3
x þ
3
y z ¼
10
x þ
3
y þ
2
z ¼
5
This becomes the basis of a 3
4 matrix, which you present in this way:
2
3
1
15
6
4
5
3
3
10
1
3
2
5
When a variable has no visible coefficient, implicitly its coefficient is 1. You use this
fact when you create a matrix to represent a system of equations. Implicit coef-
ficients appear as 1. Along the same lines, negative coefficients remain negative.
One further point is that you can combine equations with different numbers of
variables. For example, a system similar to the one just shown might take the
following form:
x
5
z ¼
6
3
x þ
3
y z ¼
10
3
y þ
2
z ¼
5
When you translate such a system of equations into a matrix, to preserve the
orders of the variables, you insert zeros. Here is how you represent such a system:
10
5
6
33
10
03 2 5
In this system of equations, you account for the missing
y
and
x
variables in the
first and third equations by inserting zeros.
Note
In the discussion in this chapter, the enclosing square braces that often characterize matrices do
not appear. This is a measure taken to make the presentation of the matrices easier. For general
purposes, enclosing braces is often regarded as a matter of personal preference.