Homework 1 Solution

Problem 1

We will use matrices extensively in this class, often in the context of solving linear system of equations. For the following equations, find all the solutions, or explain why there is no solution. You may use a computer.

a) Solve \(\begin{bmatrix} 1 & 2 & 3 \\ 4 & 0 & 5 \\ 6 & 11 & 2 \end{bmatrix} x =\begin{bmatrix} 1 \\2 \\ 3 \end{bmatrix}\)

b) Solve \(\begin{bmatrix} 1 & 2 \\ -0.5 & -1 \end{bmatrix} x = \begin{bmatrix} 1 \\ 2 \end{bmatrix}\)

c) Solve \(\begin{bmatrix} 2 & 0 & 1 \\ -1 & 1 & 2 \end{bmatrix} x = \begin{bmatrix} 1 \\ 2 \end{bmatrix}\)

Solution

a) Straight forward computation since the matrix is invertible.

b) No solution. Since \(\begin{bmatrix} 1 \\ 2 \end{bmatrix}\) is not in the column space of \(\begin{bmatrix} 1 & 2 \\ -0.5 & -1 \end{bmatrix}\).

c) There are infinite number of solutions. They can be parameterized as \(x_0+ t z\) where \(x_0\) is any particular solution and \(z\) is in the null space of the matrix, and $t$ ranges over all real numbers. For example,

\[x=\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} + t \begin{bmatrix} 1 \\ 5 \\ -2 \end{bmatrix}.\]

Problem 2

Some questions about matrices.

a) Let \(\mathbf{A}\) be a \(n\) by \(n\) symmetric real matrix. Show the eigenvalues of \(\mathbf{A}\) are real.

b) Find a 2 by 2 matrix with just one eigenvalue. Note, matrices with repeated eigenvalues do not count. For example, the identity matrix has 2 eigenvalues both equal to 1, but it’s not what this question is asking for. We are looking for a matrix with just 1 eigenvalue.

c) Let \(\mathbf{A}\) and \(\mathbf{B}\) be two matrices where \(\mathbf{AB}\) and \(\mathbf{BA}\) both make sense. Let \(\mathrm{Tr}\) be the trace operator. Show that \(\mathrm{Tr} (\mathbf{AB})=\mathrm{Tr} (\mathbf{BA})\).

Solution

a) Let \(\lambda\) and \(v\) be an eigenvalue eigenvector pair. A common mistake is to assume that \(v\) is real. This turns out to be true, but the prove often involves showing the eigenvalue is real first. There are multiple ways to show \(\lambda\) is real, one way is to look at \(v^H A^H A v\) (where \(\cdot^H\)) is the Hermitian transpose) and expand it as

\[v^H A^H A v= v^H A A v=v^H A (\lambda v) = \lambda v^H A v = \lambda^2 v^H v.\]

Rearranging, we have \(\lambda^2=\frac{\Vert Av \Vert^2}{\Vert v \Vert^2}>0\). A quick calculation shows that if \(a^2 >0\) for a complex \(a\), \(a\) is purely real.

b) This matrix, \(A=\begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}\), is one example. It is easy to check that one eigenvalue eigenvector pair is \(0\) and \(\begin{bmatrix} 0 \\ 1 \end{bmatrix}.\) We can also directly check that there is no other eigenvalue and other eigenvector pair, where the eigenvector is linearly independent to \(\begin{bmatrix} 0 \\ 1 \end{bmatrix}\). This matrix is in some sense the only way this phenomenon can happen. For more information, see Jordan normal form.

c) This can be checked by direct calculation. More precisely,

\[\mathrm{Tr}(AB)= \sum_i \sum_j A_{ij} B_{ji} = \sum_j \sum_i B_{ji} A_{ij} = \mathrm{Tr}(BA).\]

Problem 3

Complex numbers. Note that \(z^*\) denote the complex conjugate of \(z\).

a) Let \(z_1\) and \(z_2\) be two complex numbers, both with magnitude equal to 2. What is the largest possible value of \(\mathrm{Re} (z_1 \cdot z_2)\)?

b) A subset \(U\) of \(\mathbb{C}^n\) is called a complex subspace of \(\mathbb{C}^n\) if it contains \(0\) and if, given \(\mathbf{v}\) and \(\mathbf{u}\) in \(U\), \(\mathbf{v}+\mathbf{u}\) and \(z \mathbf{v}\) lie in \(U\) (for any complex scalar \(z\)). Determine whether \(U\) is a complex subspace of \(\mathbb{C}^3\) in each of the case below.

i. \(U=\{(z,z^*,0) \vert z \in \mathbb{C}\}\)

ii. \(U=\mathbb{R}^3\)

iii. \(U=\{(v+w, v-3w, v) \vert v,w \in \mathbb{C}\}\)

Solution

a) The maximum is achieved where \(z_1\) and \(z_2\) are exactly out of phase, that is, \(z_1=2 e^{j\theta}\) and \(z_2=2 e^{-j \theta}\). And the maximum is 2.

b) i) No. Multiplying a vector by \(j\) can make it move out of \(U\).

ii) No. Again, mulitplying by \(j\) can move elements out of \(U\).

iii) Yes, by directly checking the conditions. Or one can use the fact that it is a linear combination of \(v\) and \(w\).

Problem 4

Basic circuits. The values of the elements are \(R_1=1 \Omega\), \(R_2=2 \Omega\), \(Z_C=-j0.5 \Omega\), \(Z_L = j 3 \Omega\).

Circuit for problem 4

a) Find the active power and reactive power produced by the source.

b) Suppose we want the source to only deliver active power. Add to element to the circuit to achieve it (there are many ways to do this).

Solution.

a) The equivalent impedance is \(Z_{eq}=1.1176 + j2.5294\). The complex power is

\[S=P+jQ= 100*\left( \frac{100}{Z_{eq}} \right)^* = 1.46 + j3.30 (kVA).\]

b) The idea is to cancel out the reactive component of the load. For example, we can add a capacitor in series with the load with impedance \(-j 2.5294 \Omega\). One could also be added in parallel.

Problem 5

Given a network with \(n\) buses. We say the network is connected if there is a path from any bus to any other bus.

a) What is the smallest number of edges a connected network can have?

b) What about the largest number of edges?

c) For a practical grid, would it have a lot or a few edges?

Solution.

a) A connected tree is the sparsest possible networks and has \(n-1\) edges.

b) A complete graph, where all buses have an edge between them, is the densest possible. It has \({ n \choose 2}\) edges.

c) Grids are very sparse since constructing a line is very costly in terms of money, time and politics. They have \(O(n)\) edges, for example, between \(2n\) and \(3n\) edges.