File:Gelfand's formula for a 3x3 matrix.svg
From testwiki
Jump to navigation
Jump to search
Original file (SVG file, nominally 614 × 461 pixels, file size: 24 KB)
Contents
This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.
Summary
| DescriptionGelfand's formula for a 3x3 matrix.svg |
English: Gelfand's formula for a 3x3 matrix
Pythonimport numpy as np
import matplotlib.pyplot as plt
A = np.array([[9, -1, 2],
[-2, 8, 4],
[1, 1, 8]], dtype=np.float64)
k_values = np.arange(1, 200)
k_values = k_values.astype(int)
norm_1_inf_values = []
norm_F_values = []
norm_2_values = []
for k in k_values:
A_k = np.linalg.matrix_power(A, k)
norm_1_inf = np.linalg.norm(A_k, ord=1)**(1/k)
norm_F = np.linalg.norm(A_k, ord='fro')**(1/k)
norm_2 = np.linalg.norm(A_k, ord=2)**(1/k)
norm_1_inf_values.append(norm_1_inf)
norm_F_values.append(norm_F)
norm_2_values.append(norm_2)
norm_1_inf_values = np.array(norm_1_inf_values) - 10
norm_F_values = np.array(norm_F_values) - 10
norm_2_values = np.array(norm_2_values) - 10
plt.plot(k_values, norm_1_inf_values, label=r'$\| \cdot \|_1 = \| \cdot \|_\infty$')
plt.plot(k_values, norm_F_values, label=r'$\| \cdot \|_F$')
plt.plot(k_values, norm_2_values, label=r'$\| \cdot \|_2$')
# set log-log
plt.xscale('log')
plt.yscale('log')
# remove x-ticks
# plt.xticks([])
plt.xlabel(r'$k$')
plt.ylabel(r'$\|A^k\|^{\frac{1}{k}} - \|A^\infty\|^{\frac{1}{\infty}}$')
plt.legend()
plt.savefig("Gelfand's formula.svg")
plt.show()
|
| Date | |
| Source | Own work |
| Author | Cosmia Nebula |
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
This media file is uncategorized.
Please help improve this media file by adding it to one or more categories, so it may be associated with related media files (how?), and so that it can be more easily found.
Please notify the uploader with {{subst:Please link images|File:Gelfand's formula for a 3x3 matrix.svg}} ~~~~ |
Captions
Add a one-line explanation of what this file represents
Items portrayed in this file
depicts
some value
26 January 2025
24,283 byte
image/svg+xml
1a32675e3c85955fa173f96f2054a8ecee49d1a7
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Thumbnail | Dimensions | User | Comment | |
|---|---|---|---|---|---|
| current | 19:17, 26 January 2025 | 614 × 461 (24 KB) | wikimediacommons>Cosmia Nebula | Uploaded while editing "Spectral radius" on en.wikipedia.org |
File usage
There are no pages that use this file.