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.