1. Represent the following matrix as a sum of a symmetric and a skew-symmetric matrices:
[ 1 2 3 ]
[ 2 3 4 ]
[ 4 5 6 ]

By definition, a symmetric matrix is a square matrix where for each row i, and column j we have A(i,j) = A(j,i). A skew-symmetric matrix is, by definition, a square matrix such that A(i,j) = -A(j,i) for every i and j. This implies that in the skew-symmetric matrix, all values on the main diagonal are zero (as 0 = -0).

We begin by setting up two arbitrary matrices substituting real values in for the variables where possible to satisfy the bounds of the problem.


> with(linalg):
> Given:=matrix(3,3,[[1,2,3],[2,3,4],[4,5,6]]);
Given := [ 1 2 3 ]
[ 2 3 4 ]
[ 4 5 6 ]

> Symmetric:=matrix(3,3,[[a,b,c],[b,d,e],[c,e,f]]);
Symmetric := [ a b c ]
[ b d e ]
[ c e f ]

> Skew:=matrix(3,3,[[0,x,y],[-x,0,z],[-y,-z,0]]);
Skew := [ 0 x y ]
[ -x 0 z ]
[ -y -z 0 ]

> Sum:=evalm(Symmetric+Skew);
Sum := [ a b+x c+y ]
[ b-x d e+z ]
[ c-y e-z f ]

For the given matrix to be the sum of the symmetric, and skew-symmetric matrix, the sum of the values in each corresponding place must be equal. By comparing the values of the sum matrix to the given matrix, we obtain the following set of equations:
  1. a = 1
  2. d = 3
  3. f = 6
  4. b+x=2
  5. c+y=3
  6. b-x=2
  7. e+z=4
  8. c-y=4
  9. e-z=5
 
     From (4) and (6), we see that b+x=b-x, and so therefore, x = 0, b = 2. 
     From (5) and (8), we see that c+y-3=c-y-4 
                                   y-3=-y-4 
                                   2y=-1 
                                   y = -.5 
                    and therefore, c = 3.5  
     From (7) and (9), we see that e+z-4=e-z-5 
                                   z-4=-z-5 
                                   2z=-1 
                                   z = -.5 
                    and therefore, e = 4.5 


Compiling all these values and putting them back in matrix form, we see that we can represent the Given matrix as the sum of the following symmetric and skew-symmetric matrices:

> SymmetricII:=matrix(3,3,[[1,2,3.5],[2,3,4.5],[3.5,4.5,6]]);
SymmetricII := [ 1 2 3.5 ]
[ 2 3 4.5 ]
[ 3.5 4.5 6 ]

> SkewSymmetric:=matrix(3,3,[[0,0,-.5],[0,0,-.5],[.5,.5,0]]);
SkewSymmetric := [ 0 0 -.5 ]
[ 0 0 -.5 ]
[ .5 .5 0 ]
Problem 2

2. Find the signs of the following permutations:
  1. (1,2, 4, 3, 5)
  2. (5, 4, 3, 2, 1)
  3. (6, 5, 4, 3, 2, 1)
  4. (n, n-1, ..., 1) for any n

The sign of a permutation can be determined by counting the number of transpositions (swaps of two numbers) we need in order to get this permutation from the trivial permutation. If there are an even number transpositions, the sign of the permutation is positive, while if there are an odd number of element swaps, the sign of the permutation is negative. Keeping this in mind, we begin.
  1. (1,2, 4, 3, 5) Since this permutations requires one element swap, the sign is negative.
  2. (5, 4, 3, 2, 1) This permutation requires two element swaps (1 and 5, 2 and 4), so the sign is positive.
  3. (6, 5, 4, 3, 2, 1) This permutation requires three element swaps (1 and 6, 2 and 5, 3 and 4), so the sign is negative.
  4. (n, n-1, ..., 1) for any n

For consideration of this permutation, we must observe what happens for some given n values, and from that we will notice a pattern, and be able to formulate a conclusion. Assuming that for each value of n the permutation is ordered as shown in part 4, the table shows the number of elements, number of swaps necessary to completely reverse the order of the permutation (so that the permutation follows, (1,2,...,n-1,n) ), and the sign of the permutation (determined by even/odd number of swaps).
of elements of swaps +/-
1 0 +
2 1 -
3 1 -
4 2 +
5 2 +
6 3 -
7 3 -
8 4 +

and so forth. From this table, we notice a pattern that can be defined as follows: The sign of the permutation is positive for n=4x or n=4x+1, and the sign of the permutation is negative for n=4x+2 or n=4x+3, for integer values of x.

Proof. Let us calculate the number of inversions in the permutation

(n,n-1,...,1)


The sign of this permutation is + if and only if the number of inversions is even.

It is clear that n is the larger number in n-1 inversions, n-1 is the larger number in n-2 inversions, ..., 2 is the larger number is 1 inversion. Thus the total number of inversions is

(n-1)+(n-2)+...+1=n(n-1)/2


We need to know when this number is even.

Case 1. n is even. Then n-1 is odd, so n/2*(n-1) is even if and only if n/2 is even, that is if and only if n=4x for some x.

Case 2. n is odd. Then n-1 is even, so n*(n-1)/2 is even if and only if (n-1)/2 is even, that is if and only if (n-1)/2=2x or n=4x+1 for some x.

Thus our permutation has sign + if and only if n=4x or n=4x+1 for some x. In all other cases this permutation has sign -.