SVD Task:

Given a matrix A, the task is to compute its singular value decomposition (SVD), i.e. find matrices U, S, and V such that:

    A = U · diag(S) · V^T

where U and V are orthogonal matrices and S contains the singular values.

Input: A dictionary with keys:
  - "n": An integer representing the number of rows of matrix A.
  - "m": An integer representing the number of columns of matrix A.
  - "matrix": A list of n lists of numbers representing the matrix A.

Example input:
{
    "n": 3,
    "m": 4,
    "matrix": [
        [1.0, 2.0, 3.0, 4.0],
        [5.0, 6.0, 7.0, 8.0],
        [9.0, 10.0, 11.0, 12.0]
    ]
}

Output: A dictionary with keys:
  - "U": A list of n lists of numbers representing the left singular vectors (with shape n x k, where k = min(n, m)).
  - "S": A list of k numbers representing the singular values.
  - "V": A list of m lists of numbers representing the right singular vectors (with shape m x k).

Example output:
{
    "U": [
        [...],
        [...],
        [...]
    ],
    "S": [s1, s2, s3],
    "V": [
        [...],
        [...],
        [...],
        [...]
    ]
}

Category: matrix_operations