Back to Understanding Linear Algebra

Quadratic forms

Functions of the form x^T A x, whose largest and smallest values over unit vectors mark the directions of greatest and least spread in data.

Understanding Linear Algebra, Quadratic forms

Status
FlagsLoading your progress…

11 exercises

Activity 7.2.2

Let's look at some more examples of quadratic forms.

  1. Consider the symmetric matrix D=[300−1]D = \begin{bmatrix} 3 & 0 \\ 0 & -1 \\ \end{bmatrix}. Write the quadratic form qD(x)q_D(\xvec) defined by DD in terms of the components of x=[x1x2]\xvec=\twovec{x_1}{x_2}. What is the value of qD([2−4])q_D\left(\twovec2{-4}\right)?

  2. Given the symmetric matrix A=[255−3]A=\begin{bmatrix} 2 & 5 \\ 5 & -3 \end{bmatrix}, write the quadratic form qA(x)q_A(\xvec) defined by AA and evaluate qA([2−1])q_A\left(\twovec{2}{-1}\right).

  3. Suppose that q([x1x2])=3x12−4x1x2+4x22q\left(\twovec{x_1}{x_2}\right) = 3x_1^2 - 4x_1x_2 + 4x_2^2. Find a symmetric matrix AA such that qq is the quadratic form defined by AA.

  4. Suppose that qq is a quadratic form and that q(x)=3q(\xvec) = 3…

2.5

Activity 7.2.4

This activity explores the relationship between the eigenvalues of a symmetric matrix and its definiteness.

  1. Consider the diagonal matrix D=[4002]D=\begin{bmatrix} 4 & 0 \\ 0 & 2 \\ \end{bmatrix} and write its quadratic form qD(x)q_D(\xvec) in terms of the components of x=[x1x2]\xvec=\twovec{x_1}{x_2}. How does this help you decide whether DD is positive definite or not?

  2. Now consider D=[4000]D=\begin{bmatrix} 4 & 0 \\ 0 & 0 \\ \end{bmatrix} and write its quadratic form qD(x)q_D(\xvec) in terms of x1x_1 and x2x_2. What can you say about the definiteness of DD?

  3. If DD is a diagonal…

2.5

Exercise 1

Suppose that A=[4227]A = \begin{bmatrix} 4 & 2 \\ 2 & 7 \end{bmatrix}.

  1. Find an orthogonal diagonalization of AA.

  2. Evaluate the quadratic form qA([11])q_A\left(\twovec11\right).

  3. Find the unit vector u\uvec for which qA(u)q_A(\uvec) is as large as possible. What is the value of qA(u)q_A(\uvec) in this direction?

  4. Find the unit vector u\uvec for which qA(u)q_A(\uvec) is as small as possible. What is the value of qA(u)q_A(\uvec) in this direction?

2.5

Exercise 2

Consider the quadratic form

  1. Find a matrix AA such that q(x)=xTAxq(\xvec) = \xvec^TA\xvec.

  2. Find the maximum and minimum values of q(u)q(\uvec) among all unit vectors u\uvec and describe the directions in which they occur.

2.5

Exercise 3

Suppose that AA is a demeaned data matrix:

  1. Find the covariance matrix CC.

  2. What is the variance of the data projected onto the line defined by u=[1/21/2]\uvec=\twovec{1/\sqrt{2}}{1/\sqrt{2}}.

  3. What is the total variance?

  4. In which direction is the variance greatest and what is the variance in this direction?

2.5

Exercise 4

Consider the matrix A=[4−3−3−34−3−3−34]A = \begin{bmatrix} 4 & -3 & -3 \\ -3 & 4 & -3 \\ -3 & -3 & 4 \\ \end{bmatrix}.

  1. Find QQ and DD such that A=QDQTA=QDQ^T.

  2. Find the maximum and minimum values of q(u)=xTAxq(\uvec) = \xvec^TA\xvec among all unit vectors u\uvec.

  3. Describe the direction in which the minimum value occurs. What can you say about the direction in which the maximum occurs?

2.5

Exercise 5

Consider the matrix B=[−214−22−1]B = \begin{bmatrix} -2 & 1 \\ 4 & -2 \\ 2 & -1 \\ \end{bmatrix}.

  1. Find the matrix AA so that q([x1x2])=∣Bx∣2=qA(x)q\left(\twovec{x_1}{x_2}\right) = \len{B\xvec}^2=q_A(\xvec).

  2. Find the maximum and minimum values of q(u)q(\uvec) among all unit vectors u\uvec and describe the directions in which they occur.

  3. What does the minimum value of q(u)q(\uvec) tell you about the matrix BB?

2.5

Exercise 6

Consider the quadratic form

  1. What can you say about the definiteness of the matrix AA that defines the quadratic form?

  2. Find a matrix QQ so that the change of coordinates y=QTx\yvec = Q^T\xvec transforms the quadratic form into one that has no cross terms. Write the quadratic form in terms of y\yvec.

  3. What are the maximum and minimum values for q(u)q(\uvec) among all unit vectors u\uvec?

2.5

Exercise 7

Explain why the following statements are true.

  1. Given any matrix BB, the matrix BTBB^TB is a symmetric, positive semidefinite matrix.

  2. If both AA and BB are symmetric, positive definite matrices, then A+BA+B is a symmetric, positive definite matrix.

  3. If AA is a symmetric, invertible, positive definite matrix, then A−1A^{-1} is also.

2.5

Exercise 8

Determine whether the following statements are true or false and explain your reasoning.

  1. If AA is an indefinite matrix, we can't know whether it is positive definite or not.

  2. If the smallest eigenvalue of AA is 3, then AA is positive definite.

  3. If CC is the covariance matrix associated with a dataset, then CC is positive semidefinite.

  4. If AA is a symmetric 2×22\times2 matrix and the maximum and minimum values of qA(u)q_A(\uvec) occur…

2.5

Exercise 10

Consider the function f(x,y,z)=x4+y4+z4−4xyzf(x,y,z) = x^4 + y^4 +z^4 - 4xyz.

  1. Show that ff has a critical point at (−1,1,−1)(-1,1,-1) and construct the Hessian HH at that point.

  2. Find the eigenvalues of HH. Is this a definite matrix of some kind?

  3. What does this imply about whether (−1,1,−1)(-1,1,-1) is a local maximum or minimum?

2.5

Adapted from Understanding Linear Algebra © 2023 David Austin. Licensed under CC BY 4.0. Source: Understanding Linear Algebra. Imported at revision 3e6dced.