Second task set

  1. I emailed the link to my GitHub pages to the professor.
  2. I wrote a function which computes and returns the absolute error between two floating point numbers. See my software manual entry
  3. I wrote a function which computes and returns the relative error between two floating point numbers. See my software manual entry
  4. I wrote a function that adds two vectors of the same length. My function can accepts both Vector and DenseArray instances in order to support elementwise addition of matrices as well. See my software manual entry
  5. I wrote a function that returns a scalar multiple of a Vector or DenseArray. I overloaded this method so that it also supports accepting two Array objects in order to return the result of an elementwise multiplication. See my software manual entry
  6. I wrote a function that computes the 2-norm of an arbitrary vector with real entries. See my software manual entry
  7. I wrote a function that computes the 1-norm of an arbitrary vector with real entries. See my software manual entry
  8. I wrote a function that computes the infinity-norm of an arbitrary vector with real entries. See my software manual entry
  9. I wrote a method that generates a symmetric matrix with random real values. See my software manual entry
    • The matrix norm of the difference between a matrix and its approximation gives us a measure for the magnitude of the error in the approximation. Following the Euclidean vector maginitude/norm analogy, we can also think of this error as the distance between two matrices. I read the description of induced norms at the website http://fourier.eng.hmc.edu/e161/lectures/algebra/node12.html. As I read about the matrix 2-norm, I was able to gain a better intuition as to why this norm would be a good measure of the norm or “magnitude” of a matrix.

    • As this website explains, the 2-norm of a matrix A, is the square root of the spectral radius of AA. The dominant eigenvalue of a matrix effectively measures the cumulative effect of a matrix with a scalar; therefore, it makes sense that the dominant eigenvalue of a matrix could be used as a good measurement of magnitude. Of course, what I just said is not entirely accurate; we know that a matrix norm must be greater than or equal to zero, therefore it makes sense to use the spectral radius of a matrix, which is the absolute value of the matrix’s dominant eigenvalue.

    • Why then, is the square root of the spectral radius of AA used as a norm and not rather than simply the spectral radius of A? For one thing, the non-square matrices have no eigenvalues. Additionally, as mentioned in a forum I found, there are non-zero matrices which have a zero spectral radius. Here is the link to the forum: https://math.stackexchange.com/questions/1944534/why-is-the-spectral-radius-of-a-matrix-not-a-norm