# Mathematics for Chemistry/Matrices and Determinants

## Simultaneous linear equations

editIf we have 2 equations of the form we may have a set of *simultaneous equations*. Suppose two rounds of drinks are bought in a cafe, one round is 4 halves of orange juice and 4 packets of crisps. This comes to 4 pounds 20. The thirstier drinkers at another table buy 4 pints of orange juice and only 1 packet of crisps and this comes to 6 pounds 30.
So we have:

and

*i.e.*

If you plot these equations they will be simultaneously true at and .

Notice that if the two rounds of drinks are 2 pints and 2 packets of crisps and 3 pints and 3 packets of crisps we cannot solve for the prices! This corresponds to two parallel straight lines which never intersect.

If we have the equations:

If these are simultaneously true we can find a *unique* solution for both and .

By subtracting the 2 equations a new equation is created where has disappeared and the system is solved.

Substituting back gives us .

This was especially easy because had the same coefficient in both equations. We can always multiply one equation throughout by a constant to make the coefficients the same.

If the equations were:

and

things would go horribly wrong when you tried to solve them because they are two copies of the same equation and therefore not *simultaneous*. We will come to this later, but in the meantime notice that 3 times 8 = 4 times 6. If our equations were:

we can still solve them but would require a lot of algebra to reduce it to three (2x2) problems which we know we can solve. This leads on to the subject of matrices and determinants.

Simultaneous equations have applications throughout the physical sciences and range in size from (2x2)s to sets of equations over 1 million by 1 million.

## Practice simultaneous equations

editSolve:

and

Notice that you can solve:

because it breaks down into a (2x2) and is not truly a (3x3). (In the case of the benzene molecular orbitals, which are (6x6), this same scheme applies. It becomes two direct solutions and two (2x2) problems which can be solved as above.)

## Matrices

editThe multiplication of matrices has been explained in the lecture.

but cannot exist. To be multiplied two matrices must have the 1st matrix with the same number of elements in a row as the 2nd matrix has elements in its columns.

where the s are the elements of .

Look at our picture of and as represented by a unit vector in a circle. The rotation of the unit vector about the -axis can be represented by the following mathematical construct.

In two dimensions we will rotate the vector at 45 degrees between and :

This is if we rotate by +45 degrees. For and . So the rotation flips over to give . The minus sign is necessary for the correct mathematics of rotation and is in the lower left element to give a right handed sense to the rotational sign convention.

As discussed earlier the solving of simultaneous equations is equivalent in some deeper sense to rotation in -dimensions.

## Matrix multiply practice

editi) Multiply the following (2x2) matrices.

=

ii) Multiply the following (3x3) matrices.

You will notice that this gives a *unit matrix* as its product.

The first matrix is the *inverse* of the 2nd.
Computers use the inverse of a matrix to solve simultaneous equations.

If we have

In matrix form this is....

In terms of work this is equivalent to the elimination method you have already employed for small equations but can be performed by computers for simultaneous equations.

(Examples of large systems of equations are the fitting of reference data to 200 references molecules, dimension 200, or the calculation of the quantum mechanical gradient of the energy where there is an equation
for every way of exciting 1 electron from an occupied orbital to an excited, (called *virtual*, orbital, (typically equations.)

## Finding the inverse

editHow do you find the inverse... You use Maple or Matlab on your PC but if the matrix is small you can use the formula...

Here Adj A is the adjoint matrix, the transposed matrix of cofactors. These strange objects are best described by example.....

This determinant is equal to: 1 ( 1 x 1 - 1 x (-1)) - (-1) ( 2 x 1 - 1 x 3) + 2 ( 2 x (-1) - ( 1 x 3) each of these terms is called a *cofactor*.

This thing gives the sign alternation in a form mathematicians like even though it is incomprehensible.

Use the determinant

to solve the simultaneous equations on page 47 by the matrix inverse method. The matrix corresponding to the equations on p47.2 is:

1 -1 2 6 2 1 1 = 3 3 -1 1 6 The cofactors are 2 1 -5 -1 -5 -2 -3 3 3 You may find these 9 copies of the matrix useful for striking out rows and columns to form this inverse.... 1 -1 2 1 -1 2 1 -1 2 2 1 1 2 1 1 2 1 1 3 -1 1 3 -1 1 3 -1 1 1 -1 2 1 -1 2 1 -1 2 2 1 1 2 1 1 2 1 1 3 -1 1 3 -1 1 3 -1 1 1 -1 2 1 -1 2 1 -1 2 2 1 1 2 1 1 2 1 1 3 -1 1 3 -1 1 3 -1 1 These are the little determinants with the -1 to the (n-1) factors and the value of the determinant is -9. The transposed matrix of cofactors is 2 -1 -3 1 -5 3 -5 -2 3 So the inverse is 2 -1 -3 -1/9 X 1 -5 3 -5 -2 3 Giving a solution 2 -1 -3 6 1 -1/9 X 1 -5 3 X 3 = -1 -5 -2 3 6 2

This takes a long time to get all the signs right. Elimination by subtracting equations is MUCH easier. However as the computer cannot make sign mistakes it is not a problem when done by computer program.

The following determinant corresponds to an equation which is repeated three times giving an unsolvable set of simultaneous equations.

Matrix multiplication is not necessarily commutative, which in English means does not equal all the time. Multiplication may not even be possible in the case of rectangular rather than square matrices.

I will put a list of the properties and definitions of matrices in an appendix for reference through the later years of the course.

## Determinants and the Eigenvalue problem

editIn 2nd year quantum chemistry you will come across this object:

You divide by and set to equal to get:

Expand this out and factorise it into two quadratic equations to give:

which can be solved using

### Simultaneous equations as linear algebra

editThe above determinant is a special case of simultaneous equations which occurs all the time in chemistry, physics and engineering which looks like this:

This equation in matrix form is and the solution is .

This is a *polynomial equation* like the quartic above. As you know polynomial equations have as many solutions as the highest power of *i.e.* in this case . These solutions can be *degenerate* for example the orbitals in benzene are a degenerate pair because of the factorisation of the polynomial from the 6 Carbon-pz orbitals. In the 2nd year you may do a lab exercise where you make the benzene determinant and see that the polynomial is

from which the 6 solutions and the orbital picture are immediately obvious.

The use of matrix equations to solve arbitrarily large problems leads to a field of mathematics called *linear algebra*.

## Matrices with complex numbers in them

editWork out the quadratic equation from the 3 determinants

They are all the same! This exemplifies a deeper property of matrices which we will ignore for now other than to say that complex numbers allow you to calculate the same thing in different ways as well as being the *only* neat way to formulate some problems.