Singular Value Decomposition Calculator

The calculator will find the singular value decomposition (SVD) of the given matrix, with steps shown.

$$$\times$$$

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Your Input

Find the SVD of $$$\left[\begin{array}{ccc}0 & 1 & 1\\\sqrt{2} & 2 & 0\\0 & 1 & 1\end{array}\right]$$$.

Solution

Find the transpose of the matrix: $$$\left[\begin{array}{ccc}0 & 1 & 1\\\sqrt{2} & 2 & 0\\0 & 1 & 1\end{array}\right]^{T} = \left[\begin{array}{ccc}0 & \sqrt{2} & 0\\1 & 2 & 1\\1 & 0 & 1\end{array}\right]$$$ (for steps, see matrix transpose calculator).

Multiply the matrix with its transpose: $$$W = \left[\begin{array}{ccc}0 & 1 & 1\\\sqrt{2} & 2 & 0\\0 & 1 & 1\end{array}\right]\cdot \left[\begin{array}{ccc}0 & \sqrt{2} & 0\\1 & 2 & 1\\1 & 0 & 1\end{array}\right] = \left[\begin{array}{ccc}2 & 2 & 2\\2 & 6 & 2\\2 & 2 & 2\end{array}\right]$$$ (for steps, see matrix multiplication calculator).

Now, find the eigenvalues and eigenvectors of $$$W$$$ (for steps, see eigenvalues and eigenvectors calculator).

Eigenvalue: $$$8$$$, eigenvector: $$$\left[\begin{array}{c}1\\2\\1\end{array}\right]$$$.

Eigenvalue: $$$2$$$, eigenvector: $$$\left[\begin{array}{c}1\\-1\\1\end{array}\right]$$$.

Eigenvalue: $$$0$$$, eigenvector: $$$\left[\begin{array}{c}-1\\0\\1\end{array}\right]$$$.

Find the square roots of the nonzero eigenvalues ($$$\sigma_{i}$$$):

$$$\sigma_{1} = 2 \sqrt{2}$$$

$$$\sigma_{2} = \sqrt{2}$$$

The $$$\Sigma$$$ matrix is a zero matrix with $$$\sigma_{i}$$$ on its diagonal: $$$\Sigma = \left[\begin{array}{ccc}2 \sqrt{2} & 0 & 0\\0 & \sqrt{2} & 0\\0 & 0 & 0\end{array}\right]$$$.

The columns of the matrix $$$U$$$ are the normalized (unit) vectors: $$$U = \left[\begin{array}{ccc}\frac{\sqrt{6}}{6} & \frac{\sqrt{3}}{3} & - \frac{\sqrt{2}}{2}\\\frac{\sqrt{6}}{3} & - \frac{\sqrt{3}}{3} & 0\\\frac{\sqrt{6}}{6} & \frac{\sqrt{3}}{3} & \frac{\sqrt{2}}{2}\end{array}\right]$$$ (for steps in finding a unit vector, see unit vector calculator).

Now, $$$v_{i} = \frac{1}{\sigma_{i}}\cdot \left[\begin{array}{ccc}0 & 1 & 1\\\sqrt{2} & 2 & 0\\0 & 1 & 1\end{array}\right]^{T}\cdot u_{i}$$$:

$$$v_{1} = \frac{1}{\sigma_{1}}\cdot \left[\begin{array}{ccc}0 & 1 & 1\\\sqrt{2} & 2 & 0\\0 & 1 & 1\end{array}\right]^{T}\cdot u_{1} = \frac{1}{2 \sqrt{2}}\cdot \left[\begin{array}{ccc}0 & \sqrt{2} & 0\\1 & 2 & 1\\1 & 0 & 1\end{array}\right]\cdot \left[\begin{array}{c}\frac{\sqrt{6}}{6}\\\frac{\sqrt{6}}{3}\\\frac{\sqrt{6}}{6}\end{array}\right] = \left[\begin{array}{c}\frac{\sqrt{6}}{6}\\\frac{\sqrt{3}}{2}\\\frac{\sqrt{3}}{6}\end{array}\right]$$$ (for steps, see matrix scalar multiplication calculator and matrix multiplication calculator).

$$$v_{2} = \frac{1}{\sigma_{2}}\cdot \left[\begin{array}{ccc}0 & 1 & 1\\\sqrt{2} & 2 & 0\\0 & 1 & 1\end{array}\right]^{T}\cdot u_{2} = \frac{1}{\sqrt{2}}\cdot \left[\begin{array}{ccc}0 & \sqrt{2} & 0\\1 & 2 & 1\\1 & 0 & 1\end{array}\right]\cdot \left[\begin{array}{c}\frac{\sqrt{3}}{3}\\- \frac{\sqrt{3}}{3}\\\frac{\sqrt{3}}{3}\end{array}\right] = \left[\begin{array}{c}- \frac{\sqrt{3}}{3}\\0\\\frac{\sqrt{6}}{3}\end{array}\right]$$$ (for steps, see matrix scalar multiplication calculator and matrix multiplication calculator).

Since we have run out of nonzero $$$\sigma_{i}$$$ and need one more vector, find the orthogonal vector to all the found vectors by finding the null space of the matrix whose rows are the found vectors: $$$\left[\begin{array}{c}\sqrt{2}\\-1\\1\end{array}\right]$$$ (for steps, see null space calculator).

Normalize the vector: it becomes $$$\left[\begin{array}{c}\frac{\sqrt{2}}{2}\\- \frac{1}{2}\\\frac{1}{2}\end{array}\right]$$$, (for steps, see unit vector calculator).

Therefore, $$$V = \left[\begin{array}{ccc}\frac{\sqrt{6}}{6} & - \frac{\sqrt{3}}{3} & \frac{\sqrt{2}}{2}\\\frac{\sqrt{3}}{2} & 0 & - \frac{1}{2}\\\frac{\sqrt{3}}{6} & \frac{\sqrt{6}}{3} & \frac{1}{2}\end{array}\right].$$$

The matrices $$$U$$$, $$$\Sigma$$$, and $$$V$$$ are such that the initial matrix $$$\left[\begin{array}{ccc}0 & 1 & 1\\\sqrt{2} & 2 & 0\\0 & 1 & 1\end{array}\right] = U \Sigma V^T$$$.

Answer

$$$U = \left[\begin{array}{ccc}\frac{\sqrt{6}}{6} & \frac{\sqrt{3}}{3} & - \frac{\sqrt{2}}{2}\\\frac{\sqrt{6}}{3} & - \frac{\sqrt{3}}{3} & 0\\\frac{\sqrt{6}}{6} & \frac{\sqrt{3}}{3} & \frac{\sqrt{2}}{2}\end{array}\right]\approx \left[\begin{array}{ccc}0.408248290463863 & 0.577350269189626 & -0.707106781186548\\0.816496580927726 & -0.577350269189626 & 0\\0.408248290463863 & 0.577350269189626 & 0.707106781186548\end{array}\right]$$$A

$$$\Sigma = \left[\begin{array}{ccc}2 \sqrt{2} & 0 & 0\\0 & \sqrt{2} & 0\\0 & 0 & 0\end{array}\right]\approx \left[\begin{array}{ccc}2.82842712474619 & 0 & 0\\0 & 1.414213562373095 & 0\\0 & 0 & 0\end{array}\right]$$$A

$$$V = \left[\begin{array}{ccc}\frac{\sqrt{6}}{6} & - \frac{\sqrt{3}}{3} & \frac{\sqrt{2}}{2}\\\frac{\sqrt{3}}{2} & 0 & - \frac{1}{2}\\\frac{\sqrt{3}}{6} & \frac{\sqrt{6}}{3} & \frac{1}{2}\end{array}\right]\approx \left[\begin{array}{ccc}0.408248290463863 & -0.577350269189626 & 0.707106781186548\\0.866025403784439 & 0 & -0.5\\0.288675134594813 & 0.816496580927726 & 0.5\end{array}\right]$$$A