Problem Set 2 Individual

Problem I2-1

Kreyszig 6.2, problem 8

Part (a): a(T) B B(T) d(T)

a = {{1}, {4}, {3}};
b = {{2, -3}, {0, 2}, {0, 1}};
c = {{4, 6, 2}, {6, 0, 3}, {2, 
            3, -1}};
d = {{4, 3, 0}};

aTB = Transpose[a] . b

bTdT = Transpose[b] . Transpose[d]

aTb . bTdT // MatrixForm

Part (b): d B B(T) a

db  =  d . b

bTa  =  Transpose[b] . a

db . bTa // MatrixForm

Part (c): C B

c . b // MatrixForm

Part (d): B(T) C(T)

Transpose[b] . Transpose[c] // MatrixForm

Problem I2-2

Kreyszig 6.3, problem 16

There are many ways to approach a problem like this.  One quick way to do this is simply to set up an augmented matrix (as described in Kreyszig, section 6.3) and let Mathematica row-reduce everything.

Clear["Global`*"]

\(\(AugMat\  = \ {
		{2, 3, 1, \(-11\), 
            1}, 
		{5, \(-2\), 5, \(-4\), 
            5}, 
		{1, \(-1\), 3, \(-3\), 
            3}, 
		{3, 4, \(-7\), 
            2, \(-7\)}
		};\)\)
AugMat // MatrixForm

Thankfully, Mathematica has a row reduce function.

RowReduce[AugMat] // MatrixForm

Remember that the first four entries in each row represent coefficients of w, x, y, z in the problem.  The last column represent the augmented elements from the right hand side of each of the 4 equations.  If you notice the 4th row, it reads "0w+0x+0y+0z = 0".  Typically, when you run into a "0 = 0" situation in linear systems, that clues you in to an infinite solution.  To verify this, check out how the equations represented in Row 2 and Row 3 can never be uniquely solved without additional information.  You're left with:  y - 2z = 1 from Row 2 and x = 3z from Row 3.  Rows 1 and 4 provide no additional information about x, y, or z.  Therefore, they can take on any values and the system has infinite solutions.

Problem I2-3

Kreyszig 6.3, Problem 21

This problem is very much like the last one.  The beauty about Kirchoff's laws is that they can be interpolated into many other engineering problems, including traffic flow, under the assumption that charge (cars in this case) cannot be created or accumulated.  In-flow = out-flow.  
Since this problem is so similar to the one above, I'll solve it differently to show another Mathematica technique.

Clear["Global`*"]

\(\(TrafficMat\  = \ {
		{1, 0, 0, 
            1}, 
		{1, 1, 0, 
            0}, 
		{0, 0, 1, 
            1}, 
		{0, 1, 1, 
            0}
		};\)\)
TrafficMat // MatrixForm

This matrix represents the coefficients of the 4 x-variables, taken from the Kirchoff current law application.

Cars  =  {{1000}, {1600}, {1600}, {2200}};
Cars // MatrixForm

xvar  =  {{x1}, {x2}, {x3}, {x4}};
xvar // MatrixForm

Solve[TrafficMat . xvar == Cars]

Mathematica has told me that it may not have completely solved the problem.  Looking at its solution, I see that in fact there is no unique solution.  There are infinite.