Week-5 SVD
Week-5 SVD
Cycle-5
The idea behind the SVD is that a rectangular matrix can be broken down into a product of three other
matrices that are easy to work with. This decomposition is of the form as the one shown in the
formula below:
A=UΣVT
Where:
Source Code:
P a g e | 38
Output:
The reason for decomposing a matrix is to represent it computationally efficiently so that the
original matrix recovered quickly from these singular matrices with the least information loss.
Let us try this out and see if we obtain the same matrix upon multiplying the three matrices of the
SVD together.
Before we do this, it is essential to note that the S vector does not fit the rule of matrix multiplication.
Thus we first convert it into a diagonal matrix as follows.
Output:
We reconstruct our matrix A from its SVD. The code below will carry out this operation.
P a g e | 39
Output: