{"id":18298229,"url":"https://github.com/benw126/matrix-decomposition-algorithms","last_synced_at":"2025-04-09T09:16:24.297Z","repository":{"id":243277635,"uuid":"811990317","full_name":"benw126/matrix-decomposition-algorithms","owner":"benw126","description":"MATLAB code about several matrix decomposition and linear system algorithms. (Note for MATH4602)","archived":false,"fork":false,"pushed_at":"2024-07-04T12:24:05.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T03:24:14.657Z","etag":null,"topics":["algorithms","applied-mathematics","computation","matlab","matrix-factorization"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benw126.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-07T18:05:18.000Z","updated_at":"2024-12-21T05:13:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1b9dcda-3270-457c-a482-526d8967571b","html_url":"https://github.com/benw126/matrix-decomposition-algorithms","commit_stats":null,"previous_names":["benw126/matrix-decomposition-algorithms"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benw126%2Fmatrix-decomposition-algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benw126%2Fmatrix-decomposition-algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benw126%2Fmatrix-decomposition-algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benw126%2Fmatrix-decomposition-algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benw126","download_url":"https://codeload.github.com/benw126/matrix-decomposition-algorithms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008626,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","applied-mathematics","computation","matlab","matrix-factorization"],"created_at":"2024-11-05T15:05:33.081Z","updated_at":"2025-04-09T09:16:24.279Z","avatar_url":"https://github.com/benw126.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Doolittle Factorization\nDoolittle Factorization is a method used to decompose a square matrix $A$ into the product of a unit lower triangular matrix $L$ and an upper triangular matrix $U$, i.e., $A = LU$. Solving a linear system of the form $Ax = b$ using Gaussian elimination generally requires at least $O(n^3)$ computational cost, where $n$ is the size of the square matrix $A$. **For this factorization, decomposition itself requires $O(n^3)$ computations, but solving $LUx = b$ only requires the cost of $O(n^2)$ through forward and backward substitutions.**\n \nTherefore, if we need to solve the linear system $Ax = b$ multiple times with different right-hand side vectors $b$, the computational cost is much lower by using the Doolittle Factorization, as we only need to **perform the $O(n^3)$ decomposition once**, and then the **$O(n^2)$ forward and backward substitutions for each new $b$**.\n\n## Cholesky Factorization\nCholesky Factorization is a method used to decompose a Hermitian, positive-definite matrix $A$ into the product of a lower triangular matrix $L$ and its conjugate transpose, i.e., $A = LL^*$. The computational cost required in this decomposition is $O(n^3)$. **Every Hermitian positive-definite matrix admits a unique Cholesky decomposition**.\n\n## Circulant Matrix System\nA circulant matrix $C$ is a special type of square matrix where each row (or column) is a circular shift of the previous row (or column). We can take advantage of the fact that **every circulant matrix can be diagonalized by the Discrete Fast Fourier Transform (*DFT*) matrix $F_n$**, where $F_n C F_n^{-1} = D$ and $n$ is the size of the circulant matrix $C$. Furthermore, all the eigenvalues of $C$ can be obtained by applying the *DFT* to the first column of $C$.\n\nThe linear system $Cx = b$ is equivalent to $D(F_n)x = F_nb$. Matrix-vector multiplications of $F_nx$ and $F_n^{-1}x$ can be performed in $O(n\\log n)$ computational cost. As a result, **the linear system $D(F_n)x = F_nb$ can be solved in $O(n\\log n)$ time** using the following steps:\n\n1. Apply the *DFT* to the first column of $C$ to obtain diagonal matrix $D$.\n2. Apply the *DFT* to the right-hand side vector $b$, then divide the result elementwise by the diagonal elements of $D$.\n3. Apply the inverse *DFT* to the resulting vector.\n\nThis efficient algorithm of the circulant matrix system requires only $O(n\\log n)$ computational cost, making it a very useful technique in various applications.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenw126%2Fmatrix-decomposition-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenw126%2Fmatrix-decomposition-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenw126%2Fmatrix-decomposition-algorithms/lists"}