Gratis å bruke, uten konto

SVD-kalkulator

Del en liten rektangulær matrise A opp i kompakte faktorer U, Σ og Vᵀ. Se singularverdier, anslått numerisk rang, rekonstruert matrise og feilen, og last deretter ned resultatene som CSV.

Bruk 2–8 rader og 2–8 kolonner. Skill verdier med mellomrom eller komma, og skriv hver rad på en ny linje. Desimal- og vitenskapelig notasjon støttes. Verdiene må være mellom −1 000 000 og 1 000 000.

Numerisk flyttallsestimat, ikke et eksakt symbolsk resultat. Rang nær toleransegrensen kan variere; de kompakte faktorene er beregnet på små matriser.

Hvordan beregner jeg en SVD?

Skriv inn en rektangulær matrise med én rad per linje og verdier atskilt med mellomrom eller komma. Kalkulatoren estimerer A = UΣVᵀ og kontrollerer hvor nøyaktig faktorene rekonstruerer matrisen.

Veiledning

Slik bruker du SVD-kalkulator

The SVD Calculator splits a small matrix A into three parts, written A = U Σ Vᵀ. You type a matrix with 2 to 8 rows and 2 to 8 columns, and it shows the singular values, an estimated rank, the three factors and a rebuilt copy of A with its error. It works on numbers in your browser and gives a numerical estimate, not a symbolic proof.

Slik gjør du

  1. Type the matrix in the Matrix A box, one row per line, with values separated by spaces or commas.
  2. Press Calculate SVD. Use Load diagonal example if you only want to see how the output looks.
  3. Read the rank, the singular values and the reconstruction error at the top, then the tables for A, U, Σ, Vᵀ and the rebuilt matrix.
  4. Press Download matrices as CSV if you want the results in a file.

Eksempler

A diagonal matrix

Du skriver inn
Matrise
3 0 0 2
Du får
Rang
2
Singularverdier
3, 2
Relativ feil
0

The singular values of a diagonal matrix with positive entries are those entries sorted from largest to smallest. U and Vᵀ come out as the identity matrix.

Kjørt med verktøyets egen kode.

A matrix with a repeated direction

Du skriver inn
Matrise
1 2 2 4
Du får
Rang
1
Singularverdier
5, 0
Relativ feil
about 2e-16

The second row is twice the first, so only one direction carries information. The second singular value is zero, so the estimated rank is 1. The tiny error is floating-point noise.

Kjørt med verktøyets egen kode.

A tall 3 by 2 matrix

Du skriver inn
Matrise
1 2 3 4 5 6
Du får
Rang
2
Singularverdier
9.52552, 0.514301
U-form
3 by 2
Vᵀ-form
2 by 2

The factors are in compact form, so U has the same number of columns as there are singular values. The two values match an independent run with NumPy, 9.52551809 and 0.51430058.

Kjørt med verktøyets egen kode.

A wide 2 by 3 matrix

Du skriver inn
Matrise
2 0 0 0 1 0
Du får
Rang
2
Singularverdier
2, 1
Vᵀ-form
2 by 3

A wide matrix has as many singular values as it has rows. Vᵀ is 2 by 3, so it holds only the two directions that matter.

Kjørt med verktøyets egen kode.

Rows of different length

Du skriver inn
Matrise
1 2 3
Du får
Melding
Check matrix dimensions, row lengths and numeric values.

Every row must have the same count of numbers, at least 2 and at most 8. Text such as x, a single row, or a value above 1,000,000 in size also gives an error message.

Kjørt med verktøyets egen kode.

Når det er nyttig

  • Check a homework or class exercise on singular value decomposition for a small matrix.
  • See whether a matrix is close to losing rank by looking at its smallest singular value.
  • Get the factors of a small data table as a CSV to use in a spreadsheet.
  • Test how well the factors rebuild the original matrix.

Begrensninger

  • The matrix must have 2 to 8 rows and 2 to 8 columns, and each value must be between -1,000,000 and 1,000,000.
  • Results are floating-point estimates from a Jacobi method on the scaled matrix AᵀA. They are not exact or symbolic.
  • Rank is estimated with a small tolerance, so a very small but nonzero singular value may be counted as zero.
  • The signs of the columns of U and rows of Vᵀ can differ from another program and still be correct.

Tips

  • Compare your hand or textbook answer with the rebuilt matrix table to see that the factors work.
  • Use plain decimals or scientific notation like 1e-3. Fractions such as 1/3 are not accepted, so type 0.333333.
  • Treat the rank as a hint when the smallest singular value is tiny but not zero, because it depends on a tolerance.

Kilder

Vanlige spørsmål

What does the SVD tell me?

It writes a matrix as A = U Σ Vᵀ, where Σ holds the singular values, which are never negative and are listed from largest to smallest. They show how strongly the matrix stretches space along each of its orthogonal directions.

Can I use a non-square matrix?

Yes. Any rectangular matrix from 2 by 2 up to 8 by 8 works, for example 3 by 2 or 2 by 3. The factors are returned in compact form, with as many singular values as the smaller of the row and column counts.

How is the rank decided?

The rank is the number of singular values above a small tolerance based on the largest value and the matrix size. Because of rounding in floating point, a value very close to zero is treated as zero. It is an estimate.

Why is the reconstruction error not exactly zero?

The tool multiplies U, Σ and Vᵀ back together using ordinary computer arithmetic, which rounds numbers. The leftover is usually around 1e-16 for small matrices. A much larger error would suggest checking the input.

Why do my U and V signs differ from another calculator?

A singular vector and its negative are equally valid, as long as the matching vector in the other factor flips too. Different programs choose different signs. Check the product U Σ Vᵀ against A rather than comparing signs.

Is my matrix uploaded?

No. The calculation runs in your browser, and the page says the matrix is neither uploaded nor saved. The CSV download is made on your device.

What input format does it accept?

One matrix row per line, with numbers separated by spaces or commas. Plain decimals and scientific notation are accepted, and a minus sign may be a normal hyphen or a typographic minus. Fractions and text are rejected.

Hvordan beregner jeg en SVD?

Skriv inn en rektangulær matrise med én rad per linje og verdier atskilt med mellomrom eller komma. Kalkulatoren estimerer A = UΣVᵀ og kontrollerer hvor nøyaktig faktorene rekonstruerer matrisen.

Lastes matrisen min opp?

Nei. Decomponeringen kjøres lokalt i nettleseren din; matrisen lastes ikke opp eller lagres av dette verktøyet.

Hva er singulærverdidekomponering?

SVD faktoriserer en matrise som A = UΣVᵀ, der singulærverdiene i Σ beskriver styrken til ortogonale retninger.

Kan denne kalkulatoren håndtere rektangulære matriser?

Ja. Oppgi mellom 2 og 8 rader og kolonner; faktorene som returneres, bruker en kompakt rektangulær form.

Er den numeriske rangen eksakt?

Nei. Den estimeres ved hjelp av en flyttallstoleranse, så svært små singulærverdier kan behandles som null.