Þ ±cell_dependenciesÞ !Ù$3ec0e31c-3d09-43d1-9d9a-506320f7d964„´precedence_heuristic §cell_idÙ$3ec0e31c-3d09-43d1-9d9a-506320f7d964´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$3c3fabfc-f7e1-4e93-acfa-48c7448f968a„´precedence_heuristic §cell_idÙ$3c3fabfc-f7e1-4e93-acfa-48c7448f968a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$08508856-57bd-4d17-b8c6-3b0150e5b9af„´precedence_heuristic §cell_idÙ$08508856-57bd-4d17-b8c6-3b0150e5b9af´downstream_cells_map‚«make_circle�¡p�²upstream_cells_mapÞ °error_Bauer_Fike‘Ù$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832±exact_eigenvalues‘Ù$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832¯show_geschgorin‘Ù$a7e14252-02ee-49c1-9f46-5699cf590923´computed_eigenvalues‘Ù$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832£map�¡M‘Ù$50024c47-f094-4fed-8ec1-1861a982a49a¡/�¥plot!�¢Ï€�±error_Kato_Temple‘Ù$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832¢==�²geschgorin_centres‘Ù$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832¨scatter!�°geschgorin_radii‘Ù$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832¡:�¥zeros�¤size�°show_kato_temple‘Ù$a7e14252-02ee-49c1-9f46-5699cf590923¤plot�¡+�¡*�¯show_bauer_fike‘Ù$a7e14252-02ee-49c1-9f46-5699cf590923£cos�£sin�Ù$bc4e51aa-674e-4a46-a20d-d9bfd82ff108„´precedence_heuristic §cell_idÙ$bc4e51aa-674e-4a46-a20d-d9bfd82ff108´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$54fea52c-6adb-4c83-b380-416bfdaeacec„´precedence_heuristic §cell_idÙ$54fea52c-6adb-4c83-b380-416bfdaeacec´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$ef9e68d5-b5d5-456e-a13d-8c0149c6b2d6„´precedence_heuristic §cell_idÙ$ef9e68d5-b5d5-456e-a13d-8c0149c6b2d6´downstream_cells_map€²upstream_cells_map„§@md_str�¡M‘Ù$50024c47-f094-4fed-8ec1-1861a982a49a«latexify_md�¨getindex�Ù$e5c087db-1df5-4654-a5f3-d4c27a5a9782„´precedence_heuristic §cell_idÙ$e5c087db-1df5-4654-a5f3-d4c27a5a9782´downstream_cells_map€²upstream_cells_map‹¦String�¤@htl�Ù HypertextLiteral.attribute_value�·HypertextLiteral.Result�³RobustLocalResource�·HypertextLiteral.Bypass�¸HypertextLiteral.content�®Markdown.parse�°HypertextLiteral‘Ù$8dab1cdf-f700-4dd9-a839-58fe8cfd6c4a¨Markdown�¤read�Ù$f172a676-599b-4be7-9b5d-ceba6b1794dc„´precedence_heuristic §cell_idÙ$f172a676-599b-4be7-9b5d-ceba6b1794dc´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$5466b137-915b-4118-9dbf-f97750303784„´precedence_heuristic §cell_idÙ$5466b137-915b-4118-9dbf-f97750303784´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$c7c14c64-133f-44e2-83ea-abde368de440„´precedence_heuristic §cell_idÙ$c7c14c64-133f-44e2-83ea-abde368de440´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$371399ec-a571-4aed-b910-7307d90edad1„´precedence_heuristic §cell_idÙ$371399ec-a571-4aed-b910-7307d90edad1´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$118355a0-2104-4216-9d11-53079fa2024d„´precedence_heuristic §cell_idÙ$118355a0-2104-4216-9d11-53079fa2024d´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$a70cff6b-b3d6-4f49-aed0-4d01813d6a95„´precedence_heuristic §cell_idÙ$a70cff6b-b3d6-4f49-aed0-4d01813d6a95´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$5e85fbbb-b9b6-49f2-b33f-539ddd7f4cc0„´precedence_heuristic §cell_idÙ$5e85fbbb-b9b6-49f2-b33f-539ddd7f4cc0´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$440fa8bb-c502-4c51-bd80-b0a86d3b8507„´precedence_heuristic §cell_idÙ$440fa8bb-c502-4c51-bd80-b0a86d3b8507´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$1bae37c2-946f-467e-9b1d-c3ca5a129b98„´precedence_heuristic §cell_idÙ$1bae37c2-946f-467e-9b1d-c3ca5a129b98´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$7eba1e23-9f38-4478-84f4-e81ef653ba2c„´precedence_heuristic §cell_idÙ$7eba1e23-9f38-4478-84f4-e81ef653ba2c´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$8dab1cdf-f700-4dd9-a839-58fe8cfd6c4a„´precedence_heuristic§cell_idÙ$8dab1cdf-f700-4dd9-a839-58fe8cfd6c4a´downstream_cells_map‡LinearAlgebra�§PlutoUI’Ù$45f6befb-4518-4467-81f3-ecd6da88ccbbÙ$a7e14252-02ee-49c1-9f46-5699cf590923¥Plots�°HypertextLiteral‘Ù$e5c087db-1df5-4654-a5f3-d4c27a5a9782¬LaTeXStrings‘Ù$f6e33422-d41e-4444-b08b-b281f5eb0db3²PlutoTeachingTools�«TikzPicture‘Ù$f6e33422-d41e-4444-b08b-b281f5eb0db3²upstream_cells_map…³RobustLocalResource�®Markdown.parse�¦String�¨Markdown�¤read�Ù$760385db-cc30-40c1-8f66-5692028a96e3„´precedence_heuristic §cell_idÙ$760385db-cc30-40c1-8f66-5692028a96e3´downstream_cells_map€²upstream_cells_map�¯TableOfContents�Ù$4eb5e944-000f-4755-b039-63591d1dab8a„´precedence_heuristic §cell_idÙ$4eb5e944-000f-4755-b039-63591d1dab8a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$a3e89cc9-55b6-423f-874a-b923026847ea„´precedence_heuristic §cell_idÙ$a3e89cc9-55b6-423f-874a-b923026847ea´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$c00bddac-a453-4831-81be-d5814a7e88b9„´precedence_heuristic §cell_idÙ$c00bddac-a453-4831-81be-d5814a7e88b9´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$50024c47-f094-4fed-8ec1-1861a982a49a„´precedence_heuristic §cell_idÙ$50024c47-f094-4fed-8ec1-1861a982a49a´downstream_cells_map�¡M“Ù$ef9e68d5-b5d5-456e-a13d-8c0149c6b2d6Ù$08508856-57bd-4d17-b8c6-3b0150e5b9afÙ$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832²upstream_cells_map„£M12‘Ù$45f6befb-4518-4467-81f3-ecd6da88ccbb£M14‘Ù$45f6befb-4518-4467-81f3-ecd6da88ccbb£M13‘Ù$45f6befb-4518-4467-81f3-ecd6da88ccbb£M23‘Ù$45f6befb-4518-4467-81f3-ecd6da88ccbbÙ$a7e14252-02ee-49c1-9f46-5699cf590923„´precedence_heuristic §cell_idÙ$a7e14252-02ee-49c1-9f46-5699cf590923´downstream_cells_mapƒ¯show_geschgorin‘Ù$08508856-57bd-4d17-b8c6-3b0150e5b9af¯show_bauer_fike‘Ù$08508856-57bd-4d17-b8c6-3b0150e5b9af°show_kato_temple‘Ù$08508856-57bd-4d17-b8c6-3b0150e5b9af²upstream_cells_map‹§@md_str�¤Core�§PlutoUI‘Ù$8dab1cdf-f700-4dd9-a839-58fe8cfd6c4a°PlutoUI.CheckBox�«PlutoRunner�·PlutoRunner.create_bond�¯Core.applicable�¨getindex�¨Base.get�¥@bind�¤Base�Ù$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832„´precedence_heuristic §cell_idÙ$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832´downstream_cells_map‰°error_Bauer_Fike‘Ù$08508856-57bd-4d17-b8c6-3b0150e5b9af±exact_eigenvalues‘Ù$08508856-57bd-4d17-b8c6-3b0150e5b9af°geschgorin_radii‘Ù$08508856-57bd-4d17-b8c6-3b0150e5b9af´computed_eigenvalues‘Ù$08508856-57bd-4d17-b8c6-3b0150e5b9af±error_Kato_Temple‘Ù$08508856-57bd-4d17-b8c6-3b0150e5b9af©residuals�²geschgorin_centres‘Ù$08508856-57bd-4d17-b8c6-3b0150e5b9af¢Î´�µcomputed_eigenvectors�²upstream_cells_mapÞ £sum�¡>�¦isless�§Float64�§eachcol�¡<�£map�£min�¡M‘Ù$50024c47-f094-4fed-8ec1-1861a982a49a¡/�¡^�¦Matrix�§eigvals�£abs�¡:�¤diag�£max�§collect�£Inf�¤size�¤norm�§eachrow�¡I�¡-�©enumerate�¡+�¡*�Ù$45f6befb-4518-4467-81f3-ecd6da88ccbb„´precedence_heuristic §cell_idÙ$45f6befb-4518-4467-81f3-ecd6da88ccbb´downstream_cells_map„£M12‘Ù$50024c47-f094-4fed-8ec1-1861a982a49a£M14‘Ù$50024c47-f094-4fed-8ec1-1861a982a49a£M13‘Ù$50024c47-f094-4fed-8ec1-1861a982a49a£M23‘Ù$50024c47-f094-4fed-8ec1-1861a982a49a²upstream_cells_mapŒ§@md_str�¤Core�§PlutoUI‘Ù$8dab1cdf-f700-4dd9-a839-58fe8cfd6c4a«PlutoRunner�·PlutoRunner.create_bond�¯Core.applicable�¨getindex�¡:�¨Base.get�¥@bind�¤Base�®PlutoUI.Slider�Ù$1b5e1cf6-e041-4311-9d9a-1db6cb628a3e„´precedence_heuristic §cell_idÙ$1b5e1cf6-e041-4311-9d9a-1db6cb628a3e´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$9107b5a1-5768-436d-b705-6b9215121aa0„´precedence_heuristic §cell_idÙ$9107b5a1-5768-436d-b705-6b9215121aa0´downstream_cells_map€²upstream_cells_map�¤TODO�Ù$1309b18d-e2f0-46fa-8e0c-3a2730d69d20„´precedence_heuristic §cell_idÙ$1309b18d-e2f0-46fa-8e0c-3a2730d69d20´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$f6e33422-d41e-4444-b08b-b281f5eb0db3„´precedence_heuristic §cell_idÙ$f6e33422-d41e-4444-b08b-b281f5eb0db3´downstream_cells_map€²upstream_cells_map…¸LaTeXStrings.latexstring�¨@raw_str�¦@L_str�¬LaTeXStrings‘Ù$8dab1cdf-f700-4dd9-a839-58fe8cfd6c4a«TikzPicture‘Ù$8dab1cdf-f700-4dd9-a839-58fe8cfd6c4aÙ$9c189c48-497e-43c1-a50e-fc1ebe7f0714„´precedence_heuristic §cell_idÙ$9c189c48-497e-43c1-a50e-fc1ebe7f0714´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$f9cdf1eb-e803-48be-ab67-cd81fc33be3e„´precedence_heuristic §cell_idÙ$f9cdf1eb-e803-48be-ab67-cd81fc33be3e´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$bf7bc022-c5d2-40a1-ae48-731ee97d9a32„´precedence_heuristic §cell_idÙ$bf7bc022-c5d2-40a1-ae48-731ee97d9a32´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�´cell_execution_orderÜ !Ù$8dab1cdf-f700-4dd9-a839-58fe8cfd6c4aÙ$c00bddac-a453-4831-81be-d5814a7e88b9Ù$440fa8bb-c502-4c51-bd80-b0a86d3b8507Ù$7eba1e23-9f38-4478-84f4-e81ef653ba2cÙ$1309b18d-e2f0-46fa-8e0c-3a2730d69d20Ù$118355a0-2104-4216-9d11-53079fa2024dÙ$1bae37c2-946f-467e-9b1d-c3ca5a129b98Ù$9c189c48-497e-43c1-a50e-fc1ebe7f0714Ù$371399ec-a571-4aed-b910-7307d90edad1Ù$5466b137-915b-4118-9dbf-f97750303784Ù$bf7bc022-c5d2-40a1-ae48-731ee97d9a32Ù$a70cff6b-b3d6-4f49-aed0-4d01813d6a95Ù$5e85fbbb-b9b6-49f2-b33f-539ddd7f4cc0Ù$54fea52c-6adb-4c83-b380-416bfdaeacecÙ$f172a676-599b-4be7-9b5d-ceba6b1794dcÙ$3ec0e31c-3d09-43d1-9d9a-506320f7d964Ù$a3e89cc9-55b6-423f-874a-b923026847eaÙ$f9cdf1eb-e803-48be-ab67-cd81fc33be3eÙ$4eb5e944-000f-4755-b039-63591d1dab8aÙ$f6e33422-d41e-4444-b08b-b281f5eb0db3Ù$c7c14c64-133f-44e2-83ea-abde368de440Ù$1b5e1cf6-e041-4311-9d9a-1db6cb628a3eÙ$3c3fabfc-f7e1-4e93-acfa-48c7448f968aÙ$9107b5a1-5768-436d-b705-6b9215121aa0Ù$bc4e51aa-674e-4a46-a20d-d9bfd82ff108Ù$45f6befb-4518-4467-81f3-ecd6da88ccbbÙ$50024c47-f094-4fed-8ec1-1861a982a49aÙ$ef9e68d5-b5d5-456e-a13d-8c0149c6b2d6Ù$a7e14252-02ee-49c1-9f46-5699cf590923Ù$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832Ù$08508856-57bd-4d17-b8c6-3b0150e5b9afÙ$760385db-cc30-40c1-8f66-5692028a96e3Ù$e5c087db-1df5-4654-a5f3-d4c27a5a9782´last_hot_reload_timeË ®process_status¥ready¤pathÙ_/home/runner/work/error-control-modelling/error-control-modelling/src/04_Matrix_error_bounds.jlpluto_version¨v0.20.21ªcell_orderÜ !Ù$c00bddac-a453-4831-81be-d5814a7e88b9Ù$8dab1cdf-f700-4dd9-a839-58fe8cfd6c4aÙ$440fa8bb-c502-4c51-bd80-b0a86d3b8507Ù$7eba1e23-9f38-4478-84f4-e81ef653ba2cÙ$1309b18d-e2f0-46fa-8e0c-3a2730d69d20Ù$118355a0-2104-4216-9d11-53079fa2024dÙ$1bae37c2-946f-467e-9b1d-c3ca5a129b98Ù$9c189c48-497e-43c1-a50e-fc1ebe7f0714Ù$371399ec-a571-4aed-b910-7307d90edad1Ù$5466b137-915b-4118-9dbf-f97750303784Ù$bf7bc022-c5d2-40a1-ae48-731ee97d9a32Ù$a70cff6b-b3d6-4f49-aed0-4d01813d6a95Ù$5e85fbbb-b9b6-49f2-b33f-539ddd7f4cc0Ù$54fea52c-6adb-4c83-b380-416bfdaeacecÙ$f172a676-599b-4be7-9b5d-ceba6b1794dcÙ$3ec0e31c-3d09-43d1-9d9a-506320f7d964Ù$a3e89cc9-55b6-423f-874a-b923026847eaÙ$f9cdf1eb-e803-48be-ab67-cd81fc33be3eÙ$4eb5e944-000f-4755-b039-63591d1dab8aÙ$f6e33422-d41e-4444-b08b-b281f5eb0db3Ù$c7c14c64-133f-44e2-83ea-abde368de440Ù$1b5e1cf6-e041-4311-9d9a-1db6cb628a3eÙ$3c3fabfc-f7e1-4e93-acfa-48c7448f968aÙ$9107b5a1-5768-436d-b705-6b9215121aa0Ù$bc4e51aa-674e-4a46-a20d-d9bfd82ff108Ù$ef9e68d5-b5d5-456e-a13d-8c0149c6b2d6Ù$50024c47-f094-4fed-8ec1-1861a982a49aÙ$45f6befb-4518-4467-81f3-ecd6da88ccbbÙ$08508856-57bd-4d17-b8c6-3b0150e5b9afÙ$a7e14252-02ee-49c1-9f46-5699cf590923Ù$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832Ù$760385db-cc30-40c1-8f66-5692028a96e3Ù$e5c087db-1df5-4654-a5f3-d4c27a5a9782±published_objects€¥nbpkgжwaiting_for_permissionÂÙ,waiting_for_permission_but_probably_disabled²installed_versions‡LinearAlgebra¦stdlib§PlutoUI¦0.7.71¥Plots¦1.40.7°HypertextLiteral¥0.9.5¬LaTeXStrings¥1.4.0²PlutoTeachingTools¥0.4.6¬TikzPictures¥3.5.0°terminal_outputsˆªnbpkg_syncÚB [0m[1mResolving...[22m [90m===[39m [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Project.toml` [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Manifest.toml` [0m[1mInstantiating...[22m [90m===[39m [0m[1mPrecompiling...[22m [90m===[39m Waiting for notebook process to start... Done. Starting precompilation... [92m[1mPrecompiling[22m[39m project... 743.2 ms[32m ✓ [39m[90mGettext_jll[39m 905.4 ms[32m ✓ [39m[90mWayland_jll[39m 965.1 ms[32m ✓ [39m[90mGlib_jll[39m 2618.1 ms[32m ✓ [39m[90mOpenSSL[39m 943.8 ms[32m ✓ [39m[90mCairo_jll[39m 1566.8 ms[32m ✓ [39m[90mQt5Base_jll[39m 988.9 ms[32m ✓ [39m[90mHarfBuzz_jll[39m 1412.1 ms[32m ✓ [39m[90mPoppler_jll[39m 5037.2 ms[32m ✓ [39mPlutoTeachingTools 1393.7 ms[32m ✓ [39m[90mPango_jll[39m 1408.1 ms[32m ✓ [39m[90mlibass_jll[39m 1125.3 ms[32m ✓ [39m[90mHarfBuzz_ICU_jll[39m 849.7 ms[32m ✓ [39m[90mlibdecor_jll[39m 809.5 ms[32m ✓ [39m[90mtectonic_jll[39m 1254.6 ms[32m ✓ [39m[90mFFMPEG_jll[39m 855.6 ms[32m ✓ [39m[90mGLFW_jll[39m 966.5 ms[32m ✓ [39mTikzPictures 721.4 ms[32m ✓ [39m[90mFFMPEG[39m 812.2 ms[32m ✓ [39m[90mGR_jll[39m 18500.7 ms[32m ✓ [39m[90mHTTP[39m 3623.8 ms[32m ✓ [39m[90mGR[39m 64248.0 ms[32m ✓ [39mPlots 3440.4 ms[32m ✓ [39mPlots → UnitfulExtLinearAlgebraÚB [0m[1mResolving...[22m [90m===[39m [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Project.toml` [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Manifest.toml` [0m[1mInstantiating...[22m [90m===[39m [0m[1mPrecompiling...[22m [90m===[39m Waiting for notebook process to start... Done. Starting precompilation... [92m[1mPrecompiling[22m[39m project... 743.2 ms[32m ✓ [39m[90mGettext_jll[39m 905.4 ms[32m ✓ [39m[90mWayland_jll[39m 965.1 ms[32m ✓ [39m[90mGlib_jll[39m 2618.1 ms[32m ✓ [39m[90mOpenSSL[39m 943.8 ms[32m ✓ [39m[90mCairo_jll[39m 1566.8 ms[32m ✓ [39m[90mQt5Base_jll[39m 988.9 ms[32m ✓ [39m[90mHarfBuzz_jll[39m 1412.1 ms[32m ✓ [39m[90mPoppler_jll[39m 5037.2 ms[32m ✓ [39mPlutoTeachingTools 1393.7 ms[32m ✓ [39m[90mPango_jll[39m 1408.1 ms[32m ✓ [39m[90mlibass_jll[39m 1125.3 ms[32m ✓ [39m[90mHarfBuzz_ICU_jll[39m 849.7 ms[32m ✓ [39m[90mlibdecor_jll[39m 809.5 ms[32m ✓ [39m[90mtectonic_jll[39m 1254.6 ms[32m ✓ [39m[90mFFMPEG_jll[39m 855.6 ms[32m ✓ [39m[90mGLFW_jll[39m 966.5 ms[32m ✓ [39mTikzPictures 721.4 ms[32m ✓ [39m[90mFFMPEG[39m 812.2 ms[32m ✓ [39m[90mGR_jll[39m 18500.7 ms[32m ✓ [39m[90mHTTP[39m 3623.8 ms[32m ✓ [39m[90mGR[39m 64248.0 ms[32m ✓ [39mPlots 3440.4 ms[32m ✓ [39mPlots → UnitfulExt§PlutoUIÚB [0m[1mResolving...[22m [90m===[39m [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Project.toml` [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Manifest.toml` [0m[1mInstantiating...[22m [90m===[39m [0m[1mPrecompiling...[22m [90m===[39m Waiting for notebook process to start... Done. Starting precompilation... [92m[1mPrecompiling[22m[39m project... 743.2 ms[32m ✓ [39m[90mGettext_jll[39m 905.4 ms[32m ✓ [39m[90mWayland_jll[39m 965.1 ms[32m ✓ [39m[90mGlib_jll[39m 2618.1 ms[32m ✓ [39m[90mOpenSSL[39m 943.8 ms[32m ✓ [39m[90mCairo_jll[39m 1566.8 ms[32m ✓ [39m[90mQt5Base_jll[39m 988.9 ms[32m ✓ [39m[90mHarfBuzz_jll[39m 1412.1 ms[32m ✓ [39m[90mPoppler_jll[39m 5037.2 ms[32m ✓ [39mPlutoTeachingTools 1393.7 ms[32m ✓ [39m[90mPango_jll[39m 1408.1 ms[32m ✓ [39m[90mlibass_jll[39m 1125.3 ms[32m ✓ [39m[90mHarfBuzz_ICU_jll[39m 849.7 ms[32m ✓ [39m[90mlibdecor_jll[39m 809.5 ms[32m ✓ [39m[90mtectonic_jll[39m 1254.6 ms[32m ✓ [39m[90mFFMPEG_jll[39m 855.6 ms[32m ✓ [39m[90mGLFW_jll[39m 966.5 ms[32m ✓ [39mTikzPictures 721.4 ms[32m ✓ [39m[90mFFMPEG[39m 812.2 ms[32m ✓ [39m[90mGR_jll[39m 18500.7 ms[32m ✓ [39m[90mHTTP[39m 3623.8 ms[32m ✓ [39m[90mGR[39m 64248.0 ms[32m ✓ [39mPlots 3440.4 ms[32m ✓ [39mPlots → UnitfulExt¥PlotsÚB [0m[1mResolving...[22m [90m===[39m [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Project.toml` [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Manifest.toml` [0m[1mInstantiating...[22m [90m===[39m [0m[1mPrecompiling...[22m [90m===[39m Waiting for notebook process to start... Done. Starting precompilation... [92m[1mPrecompiling[22m[39m project... 743.2 ms[32m ✓ [39m[90mGettext_jll[39m 905.4 ms[32m ✓ [39m[90mWayland_jll[39m 965.1 ms[32m ✓ [39m[90mGlib_jll[39m 2618.1 ms[32m ✓ [39m[90mOpenSSL[39m 943.8 ms[32m ✓ [39m[90mCairo_jll[39m 1566.8 ms[32m ✓ [39m[90mQt5Base_jll[39m 988.9 ms[32m ✓ [39m[90mHarfBuzz_jll[39m 1412.1 ms[32m ✓ [39m[90mPoppler_jll[39m 5037.2 ms[32m ✓ [39mPlutoTeachingTools 1393.7 ms[32m ✓ [39m[90mPango_jll[39m 1408.1 ms[32m ✓ [39m[90mlibass_jll[39m 1125.3 ms[32m ✓ [39m[90mHarfBuzz_ICU_jll[39m 849.7 ms[32m ✓ [39m[90mlibdecor_jll[39m 809.5 ms[32m ✓ [39m[90mtectonic_jll[39m 1254.6 ms[32m ✓ [39m[90mFFMPEG_jll[39m 855.6 ms[32m ✓ [39m[90mGLFW_jll[39m 966.5 ms[32m ✓ [39mTikzPictures 721.4 ms[32m ✓ [39m[90mFFMPEG[39m 812.2 ms[32m ✓ [39m[90mGR_jll[39m 18500.7 ms[32m ✓ [39m[90mHTTP[39m 3623.8 ms[32m ✓ [39m[90mGR[39m 64248.0 ms[32m ✓ [39mPlots 3440.4 ms[32m ✓ [39mPlots → UnitfulExt°HypertextLiteralÚB [0m[1mResolving...[22m [90m===[39m [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Project.toml` [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Manifest.toml` [0m[1mInstantiating...[22m [90m===[39m [0m[1mPrecompiling...[22m [90m===[39m Waiting for notebook process to start... Done. Starting precompilation... [92m[1mPrecompiling[22m[39m project... 743.2 ms[32m ✓ [39m[90mGettext_jll[39m 905.4 ms[32m ✓ [39m[90mWayland_jll[39m 965.1 ms[32m ✓ [39m[90mGlib_jll[39m 2618.1 ms[32m ✓ [39m[90mOpenSSL[39m 943.8 ms[32m ✓ [39m[90mCairo_jll[39m 1566.8 ms[32m ✓ [39m[90mQt5Base_jll[39m 988.9 ms[32m ✓ [39m[90mHarfBuzz_jll[39m 1412.1 ms[32m ✓ [39m[90mPoppler_jll[39m 5037.2 ms[32m ✓ [39mPlutoTeachingTools 1393.7 ms[32m ✓ [39m[90mPango_jll[39m 1408.1 ms[32m ✓ [39m[90mlibass_jll[39m 1125.3 ms[32m ✓ [39m[90mHarfBuzz_ICU_jll[39m 849.7 ms[32m ✓ [39m[90mlibdecor_jll[39m 809.5 ms[32m ✓ [39m[90mtectonic_jll[39m 1254.6 ms[32m ✓ [39m[90mFFMPEG_jll[39m 855.6 ms[32m ✓ [39m[90mGLFW_jll[39m 966.5 ms[32m ✓ [39mTikzPictures 721.4 ms[32m ✓ [39m[90mFFMPEG[39m 812.2 ms[32m ✓ [39m[90mGR_jll[39m 18500.7 ms[32m ✓ [39m[90mHTTP[39m 3623.8 ms[32m ✓ [39m[90mGR[39m 64248.0 ms[32m ✓ [39mPlots 3440.4 ms[32m ✓ [39mPlots → UnitfulExt¬LaTeXStringsÚB [0m[1mResolving...[22m [90m===[39m [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Project.toml` [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Manifest.toml` [0m[1mInstantiating...[22m [90m===[39m [0m[1mPrecompiling...[22m [90m===[39m Waiting for notebook process to start... Done. Starting precompilation... [92m[1mPrecompiling[22m[39m project... 743.2 ms[32m ✓ [39m[90mGettext_jll[39m 905.4 ms[32m ✓ [39m[90mWayland_jll[39m 965.1 ms[32m ✓ [39m[90mGlib_jll[39m 2618.1 ms[32m ✓ [39m[90mOpenSSL[39m 943.8 ms[32m ✓ [39m[90mCairo_jll[39m 1566.8 ms[32m ✓ [39m[90mQt5Base_jll[39m 988.9 ms[32m ✓ [39m[90mHarfBuzz_jll[39m 1412.1 ms[32m ✓ [39m[90mPoppler_jll[39m 5037.2 ms[32m ✓ [39mPlutoTeachingTools 1393.7 ms[32m ✓ [39m[90mPango_jll[39m 1408.1 ms[32m ✓ [39m[90mlibass_jll[39m 1125.3 ms[32m ✓ [39m[90mHarfBuzz_ICU_jll[39m 849.7 ms[32m ✓ [39m[90mlibdecor_jll[39m 809.5 ms[32m ✓ [39m[90mtectonic_jll[39m 1254.6 ms[32m ✓ [39m[90mFFMPEG_jll[39m 855.6 ms[32m ✓ [39m[90mGLFW_jll[39m 966.5 ms[32m ✓ [39mTikzPictures 721.4 ms[32m ✓ [39m[90mFFMPEG[39m 812.2 ms[32m ✓ [39m[90mGR_jll[39m 18500.7 ms[32m ✓ [39m[90mHTTP[39m 3623.8 ms[32m ✓ [39m[90mGR[39m 64248.0 ms[32m ✓ [39mPlots 3440.4 ms[32m ✓ [39mPlots → UnitfulExt¬TikzPicturesÚB [0m[1mResolving...[22m [90m===[39m [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Project.toml` [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Manifest.toml` [0m[1mInstantiating...[22m [90m===[39m [0m[1mPrecompiling...[22m [90m===[39m Waiting for notebook process to start... Done. Starting precompilation... [92m[1mPrecompiling[22m[39m project... 743.2 ms[32m ✓ [39m[90mGettext_jll[39m 905.4 ms[32m ✓ [39m[90mWayland_jll[39m 965.1 ms[32m ✓ [39m[90mGlib_jll[39m 2618.1 ms[32m ✓ [39m[90mOpenSSL[39m 943.8 ms[32m ✓ [39m[90mCairo_jll[39m 1566.8 ms[32m ✓ [39m[90mQt5Base_jll[39m 988.9 ms[32m ✓ [39m[90mHarfBuzz_jll[39m 1412.1 ms[32m ✓ [39m[90mPoppler_jll[39m 5037.2 ms[32m ✓ [39mPlutoTeachingTools 1393.7 ms[32m ✓ [39m[90mPango_jll[39m 1408.1 ms[32m ✓ [39m[90mlibass_jll[39m 1125.3 ms[32m ✓ [39m[90mHarfBuzz_ICU_jll[39m 849.7 ms[32m ✓ [39m[90mlibdecor_jll[39m 809.5 ms[32m ✓ [39m[90mtectonic_jll[39m 1254.6 ms[32m ✓ [39m[90mFFMPEG_jll[39m 855.6 ms[32m ✓ [39m[90mGLFW_jll[39m 966.5 ms[32m ✓ [39mTikzPictures 721.4 ms[32m ✓ [39m[90mFFMPEG[39m 812.2 ms[32m ✓ [39m[90mGR_jll[39m 18500.7 ms[32m ✓ [39m[90mHTTP[39m 3623.8 ms[32m ✓ [39m[90mGR[39m 64248.0 ms[32m ✓ [39mPlots 3440.4 ms[32m ✓ [39mPlots → UnitfulExt²PlutoTeachingToolsÚB [0m[1mResolving...[22m [90m===[39m [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Project.toml` [32m[1m No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_ryugduuuje/Manifest.toml` [0m[1mInstantiating...[22m [90m===[39m [0m[1mPrecompiling...[22m [90m===[39m Waiting for notebook process to start... Done. Starting precompilation... [92m[1mPrecompiling[22m[39m project... 743.2 ms[32m ✓ [39m[90mGettext_jll[39m 905.4 ms[32m ✓ [39m[90mWayland_jll[39m 965.1 ms[32m ✓ [39m[90mGlib_jll[39m 2618.1 ms[32m ✓ [39m[90mOpenSSL[39m 943.8 ms[32m ✓ [39m[90mCairo_jll[39m 1566.8 ms[32m ✓ [39m[90mQt5Base_jll[39m 988.9 ms[32m ✓ [39m[90mHarfBuzz_jll[39m 1412.1 ms[32m ✓ [39m[90mPoppler_jll[39m 5037.2 ms[32m ✓ [39mPlutoTeachingTools 1393.7 ms[32m ✓ [39m[90mPango_jll[39m 1408.1 ms[32m ✓ [39m[90mlibass_jll[39m 1125.3 ms[32m ✓ [39m[90mHarfBuzz_ICU_jll[39m 849.7 ms[32m ✓ [39m[90mlibdecor_jll[39m 809.5 ms[32m ✓ [39m[90mtectonic_jll[39m 1254.6 ms[32m ✓ [39m[90mFFMPEG_jll[39m 855.6 ms[32m ✓ [39m[90mGLFW_jll[39m 966.5 ms[32m ✓ [39mTikzPictures 721.4 ms[32m ✓ [39m[90mFFMPEG[39m 812.2 ms[32m ✓ [39m[90mGR_jll[39m 18500.7 ms[32m ✓ [39m[90mHTTP[39m 3623.8 ms[32m ✓ [39m[90mGR[39m 64248.0 ms[32m ✓ [39mPlots 3440.4 ms[32m ✓ [39mPlots → UnitfulExt§enabledìinstantiated÷restart_recommended_msgÀ´restart_required_msgÀ¯install_time_nsÏ Ð‡BŠbusy_packages�«cell_inputsÞ !Ù$3ec0e31c-3d09-43d1-9d9a-506320f7d964„§cell_idÙ$3ec0e31c-3d09-43d1-9d9a-506320f7d964¤codeÚémd""" !!! note "Theorem 4 (Kato-Temple)" Let $\tilde{v}$ be an approximate eigenvector to $A$, $\|\tilde{v}\|=1, \tilde{\lambda}=\langle\tilde{v}, A \tilde{v}\rangle$, and $r=A \tilde{v}-\tilde{\lambda} \tilde{v}.$ Assume we know an interval $(a, b)$ with $\tilde{\lambda} \in(a, b)$ and where $\lambda$ is the only eigenvalue of $A$ in $(a, b)$. Then, ```math \frac{\|r\|_{2}^{2}}{a-\tilde{\lambda}} \leq \tilde{\lambda}-\lambda \leq \frac{\|r\|_{2}^{2}}{b-\tilde{\lambda}} ``` """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$3c3fabfc-f7e1-4e93-acfa-48c7448f968a„§cell_idÙ$3c3fabfc-f7e1-4e93-acfa-48c7448f968a¤codeÚŽmd""" > *Proof.* > We set $\theta \equiv \theta(v, \tilde{v})$ and write $\tilde{v}=v \cos \theta+w \sin \theta$, where $w \perp v$ is chosen appropriately. > We have > ```math > \begin{align} > (A-\tilde{\lambda} I) \tilde{v} & =\cos \theta(A-\tilde{\lambda} I) v +\sin \theta(A-\tilde{\lambda} I) w \\ > & =\cos \theta({ \lambda} -\tilde{\lambda}) v+\sin \theta(A-\tilde{\lambda} I) w > \end{align} > ``` > Note that >```math > \begin{align} > \langle v, (A-\tilde{\lambda} I) w \rangle & =\langle(A-\tilde{\lambda} I) v, w\rangle \\ > & =(\lambda-\tilde{\lambda})\langle v, w\rangle=0, > \end{align} > ``` > i.e. the two vectors in the previous sum are orthogonal. > Therefore > ```math > \begin{align} > \|r \|_{2}^{2} & = \| (A-\tilde{\lambda} I ) \tilde{v} \|_{2}^{2} \\ > & =\cos ^{2} \theta \ |\lambda-\tilde{\lambda}|^{2}+\sin ^{2} \theta \ \|(A-\tilde{\lambda} I) w\|_{2}^{2} > \end{align} > ``` > Hence, > ```math > \sin ^{2} \theta\|(A-\tilde{\lambda} I) w\|_{2}^{2} \leq\|r\|_{2}^{2} > ``` > Since $w \perp v$, >```math > \begin{aligned} > \|(A-\tilde{\lambda} I) w\|_{2} & =\left\|\sum_{\substack{i=1 \\ > \lambda_{i} \neq \lambda}}^{n}\left(\lambda_{i}-\tilde{\lambda}\right) v_{i} v_{i}^{H} w\right\|_{2} \\ > & \geq \min _{\substack{i=1, \dots, n \\ > \lambda_i \neq \lambda}}\left|\lambda_{i}-\tilde{\lambda}\right|=\delta > \end{aligned} >``` > This concludes the proof. $\hspace{11cm} \square$ """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$08508856-57bd-4d17-b8c6-3b0150e5b9af„§cell_idÙ$08508856-57bd-4d17-b8c6-3b0150e5b9af¤codeÚýbegin function make_circle(xmidpoint, radius; n=100) θs = (0:n) .* 2Ï€ ./ n map(radius .* cos.(θs), radius .* sin.(θs)) do x, y x + xmidpoint, y end end p = plot(; aspect_ratio=1.0, xlims=[0, 6], ylims=[-1.5, 1.5], legend=:bottomright) scatter!(p, exact_eigenvalues, zeros(size(M, 1)); label="eigenvalues", mark=:x, markersize=8) scatter!(p, computed_eigenvalues, zeros(size(M, 1)); label="computed", mark=:+, markersize=8) for i in 1:size(M, 1) if show_geschgorin label = i==1 ? "Gerschgorin" : "" circle = make_circle(geschgorin_centres[i], geschgorin_radii[i]) plot!(p, circle; color=3, label, lw=2) end if show_bauer_fike label = i==1 ? "Bauer-Fike" : "" circle = make_circle(computed_eigenvalues[i], error_Bauer_Fike[i]) plot!(p, circle; color=4, label, lw=2) end if show_kato_temple label = i==1 ? "Kato-Temple" : "" circle = make_circle(computed_eigenvalues[i], error_Kato_Temple[i]) plot!(p, circle ; color=5, label, lw=2) end end p end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$bc4e51aa-674e-4a46-a20d-d9bfd82ff108„§cell_idÙ$bc4e51aa-674e-4a46-a20d-d9bfd82ff108¤codeÙ"md""" ## Error bounds showcase """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$54fea52c-6adb-4c83-b380-416bfdaeacec„§cell_idÙ$54fea52c-6adb-4c83-b380-416bfdaeacec¤codeÚ md""" !!! note "Lemma 3" Let $\tilde{v}$ be an approximate eigenvector of a Hermitian matrix $A$ with (for simplicity) $\|\tilde{v}\| = 1$. Let $\tilde \lambda$ be the associated approximated eigenvalue, calculated from $\tilde{\lambda}=\langle\tilde{v}, A \tilde{v}\rangle=R_{A}(\tilde{v})$. Further let $(\alpha, \beta)$ be an interval that contains no eigenvalue of $A$, but let $\tilde{\lambda} \in(\alpha, \beta)$. Then ```math (\beta-\tilde{\lambda})(\tilde{\lambda}-\alpha) \leq\|r\|_{2}^{2} . ``` """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$ef9e68d5-b5d5-456e-a13d-8c0149c6b2d6„§cell_idÙ$ef9e68d5-b5d5-456e-a13d-8c0149c6b2d6¤codeÚ„md""" Consider the near-diagonal matrix M = $(latexify_md(M)) with some Sliders to tune the off-diagonal elements, shown below. As approximate eigenvectors we assume the unit vectors, that is $\tilde{v}_i = e_i$. As a result the corresponding approximate eigenvalues are just ```math R_M(\tilde{v}_i) = \tilde{v}_i^T M \tilde{v}_i = M_{ii}, ``` i.e. the diagonal entries of $M$. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$e5c087db-1df5-4654-a5f3-d4c27a5a9782„§cell_idÙ$e5c087db-1df5-4654-a5f3-d4c27a5a9782¤codeÚ;let RobustLocalResource("https://teaching.matmat.org/error-control/sidebar.md", "sidebar.md") Sidebar(toc, ypos) = @htl("""""") Sidebar(Markdown.parse(read("sidebar.md", String)), 265) end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$f172a676-599b-4be7-9b5d-ceba6b1794dc„§cell_idÙ$f172a676-599b-4be7-9b5d-ceba6b1794dc¤codeÚmd""" > *Proof.* > - First notice $r \perp \tilde{v}$ : > ```math > \begin{align*} > \langle\tilde{v}, r\rangle & =\left\langle\tilde{v}, A \tilde{v}-\tilde{\lambda}\, \tilde{v}\right\rangle \\ > & =\Big\langle\tilde{v}, A \tilde{v}-\left\langle\tilde{v}, A \tilde{v}\right\rangle \tilde{v}\Big\rangle \\ > & =\langle\tilde{v}, A \tilde{v}\rangle-\langle\tilde{v}, A \tilde{v}\rangle=0 \tag{4} > \end{align*} > ``` > - Using this result as well as the trick of adding and subtracting $\tilde{\lambda} \tilde{v}$: > ```math > \begin{align} > \Big\langle(A-\alpha I) \, \tilde{v}, (A-\beta I) \, \tilde{v}\Big\rangle > &=\Big\langle(A-\tilde{\lambda} I)\, \tilde{v} +(\tilde{\lambda}-\alpha)\, \tilde v,\\ > &\hspace{50pt} > (A-\tilde{\lambda} I) \, \tilde{v}+(\tilde{\lambda}-\beta)\, \tilde{v} \Big\rangle > \\ > & =\Big\langle r+(\tilde{\lambda}-\alpha) \tilde{v},\ r+(\tilde{\lambda}-\beta) \tilde{v}\Big\rangle > \\ > & \stackrel{(4)}{=}\|r\|_{2}^{2}+(\tilde{\lambda}-\alpha)(\tilde{\lambda}-\beta). \tag{5} > \end{align} > ``` > - Now expand $\tilde{v}$ in an eigenbasis of $A$, i.e. > ```math > \tilde{v}=\sum_{i=1}^{n} c_{i} v_{i} > ``` > where $v_i$ is an eigenvector of $A$ with associated eigenvalue $\lambda_i$. > - This yields for the left-hand side of (5) > ```math > \begin{align} > \big\langle(A-\alpha I) \, \tilde v,\ (A-\beta I) \, \tilde{v}\big\rangle & =\sum_{i=1}^{n}\left|c_{i}\right|^{2}\,(\lambda_i -\alpha)(\lambda_i -\beta) \\ > & \geq 0 > \end{align} > ``` > since the interval $(\alpha, \beta)$ contains no eigenpairs. > - Considering the right-hand side of (5), we obtain > ```math > \|r\|_{2}^{2}+(\tilde{\lambda}-\alpha)(\tilde{\lambda}-\beta) \geq 0 > ``` > which is the desired result. $\hspace{10cm} \square$ """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$5466b137-915b-4118-9dbf-f97750303784„§cell_idÙ$5466b137-915b-4118-9dbf-f97750303784¤codeÚæmd""" !!! note "Theorem 2 (Bauer-Fike)" Let $A \in \mathbb{C}^{n \times n}$ Hermitian and let $(\tilde{\lambda}, \tilde{v})$ be an approximate eigenpair with $\|\tilde{v}\|_{2}=1$ and residual $r=A \tilde{v}-\tilde{\lambda} \tilde{v}$. Then, there exists an eigenvalue $\lambda$ of $A$ such that ```math \left|\lambda- \tilde \lambda \right| \leq\|r\|_{2} . ``` > *Proof.* > - If $\tilde{\lambda} \in \sigma(A)$ the result is trivial. > - Suppose $\tilde{\lambda}$ is not on eigenvalue of $A$. > Then $A-\tilde{\lambda} I$ is invertible, thus we write > ```math > \begin{align} > \tilde{v} & =(A-\tilde{\lambda} I)^{-1} r \\ > & = U \, (D-\tilde{\lambda} I)^{-1} \, U^{-1} \, r \tag{3} > \end{align} > ``` > where in the last step we used that $A$ is Hermitian, thus it can be diagonalised as $A=U D U^{-1}$ with $U$ unitary. > - Taking the 2-norm on both sids of (3) yields > ```math > \begin{aligned} > 1 =\|\tilde{v}\|_2 & =\left\|U\,(D-\tilde{\lambda} I)^{-1}\, U^{-1}\, r\right\|_2 \\ > & \leq \underbrace{\|U\|_{2}}_{=1} \ \| (D -\tilde{\lambda} I)^{-1}\|_{2} \ > {\underbrace{\left\|U^{-1}\right\|_{2}}_{=1}} \, \| r \|_{2} \\ > & =\max _{i=1,\dots,n} \left|\lambda_{i}-\tilde{\lambda}\right|^{-1} \|r\|_{2} > \end{aligned} > ``` > - Since $\text{argmin}_{i}\, x_{i}=\text{argmax}_i \, x_i^{-1}$, we obtain > ```math > \min _{i=1, \ldots, n}\left|\lambda_{i}- \tilde \lambda \right| \leq\|r\|_{2} > ``` > as desired. > $\hspace{12cm} \square$ """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$c7c14c64-133f-44e2-83ea-abde368de440„§cell_idÙ$c7c14c64-133f-44e2-83ea-abde368de440¤codeÚ;md""" - To avoid this problem, we can use Theorem 2 (Bauer-Fike) to obtain a **guaranteed lower bound on the gap**. For example: ```math \begin{align} \left|\tilde{\lambda}_{i}-\lambda_{i+1}\right| & =\left|\tilde{\lambda}_{i}-\tilde{\lambda}_{i+1}+\tilde{\lambda}_{i+1}-\lambda_{i+1}\right| \\ & \stackrel{\text{rev.}~\Delta}{\geq}\left|\tilde{\lambda}_{i}-\tilde{\lambda}_{i+1}\right|-\left|\tilde{\lambda}_{i+1}-\lambda_{i+1}\right| \\ & \hspace{-0.5em} \stackrel{\text{Thm 2}}{\geq}\left|\tilde{\lambda}_{i}-\tilde{\lambda}_{i+1}\right|-\left\|r_{i+1}\right\|_{2} \end{align} ``` and similarly for $\left|\tilde{\lambda}_{i}-\lambda_{i-1}\right|$. - This results in computable lower bounds to $\left|\tilde{\lambda}_{i}-\lambda_{i+1}\right|$ and $\left|\tilde{\lambda}_{i}-\lambda_{i-1}\right|$, thus $\delta$. Using this gap estimate thus yields a guaranteed upper bound to $\left\|r_{i}\right\|^{2} / \delta$. - Note that when $\lambda_i$ and $\lambda_{i+1}$ are too close, this estimate can be negative, thus not a valid lower bound for $\delta$. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$371399ec-a571-4aed-b910-7307d90edad1„§cell_idÙ$371399ec-a571-4aed-b910-7307d90edad1¤codeÚ‘md""" ## The residual & Bauer-Fike bound Suppose now we have obtained an approximate eigenpair $(\tilde{\lambda}, \tilde{v})$ to $A$. We can define the **residual** ```math r=A \tilde{v}-\tilde{\lambda} \tilde{v} ``` which can be computed and employed as a stopping criterion in iterations. Our goal now is to relate the residual $r$ to the error on the eigenvalue, $|\lambda-\tilde{\lambda}|$. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$118355a0-2104-4216-9d11-53079fa2024d„§cell_idÙ$118355a0-2104-4216-9d11-53079fa2024d¤codeÚ§md""" > *Proof* by contradiction. > - Assume (1) does not hold. Then there is an eigenvalue $\lambda$ such that, for all $i=1, \dots, n$, > ```math > \left|\lambda-A_{i i}\right| > \sum_{\substack{j=1 \\ j \neq i}}^{j=n} \left|A_{i j}\right| \text {. } \tag{2} > ``` > - We then write > ```math > A-\lambda I=D-\lambda I+H, > ``` > with $D=\operatorname{diag}\left(A_{11}, \ldots, A_{i i}, \ldots, A_{n n}\right)$ and $H=A-D$ (i.e. zero on the diagonal). > - Due to (2), $D - \lambda I$ is invertible, thus > ```math > A-\lambda I=(D-\lambda I)\Big(I+\underbrace{(D-\lambda I)^{-1} H}_{M}\Big) > ``` > - The elements of $M$ are > ```math > M_{i j}= \begin{cases}0 & \text{if } i=j \\ \frac{A_{i j}}{A_{i i}-\lambda} & \text {otherwise }\end{cases} > ``` > - Due to (2), we thus have $\sum_{j=1}^{n}\left|M_{i j}\right|<1$ $\forall i$, therefore $\|M\|_{\infty}< 1$, and $\varrho(M) < \|M\|_{\infty}<1$. > - Since $\varrho(M)$ bounds the modulus of the eigenvalues of $M$, we have that $I+M$ is non-singular, which implies $A-\lambda I$ is non-singular. Therefore $\lambda$ cannot be an eigenvalue of $A$. > - This contradicts our initial statement. > $\hspace{7cm} \square$ """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a70cff6b-b3d6-4f49-aed0-4d01813d6a95„§cell_idÙ$a70cff6b-b3d6-4f49-aed0-4d01813d6a95¤codeÚ^md""" In fact in many practical examples such as [Herbst, Levitt, Cances 2020, *Figure 7*](https://michael-herbst.com/publications/2020.04.28_error_nonscf_kohn_sham.pdf) one sees that Bauer-Fike does not follow the convergence behaviour of the true error. In fact for our case a better bound is the Kato-Temple bound, which we will derive next. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$5e85fbbb-b9b6-49f2-b33f-539ddd7f4cc0„§cell_idÙ$5e85fbbb-b9b6-49f2-b33f-539ddd7f4cc0¤code¾md""" ## Kato-Temple bound """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$440fa8bb-c502-4c51-bd80-b0a86d3b8507„§cell_idÙ$440fa8bb-c502-4c51-bd80-b0a86d3b8507¤codeÚfmd""" Suppose we have computed an approximate eigenpair $(\tilde \lambda, \tilde u)$ of a Hermitian matrix $A \in \mathbb C^{n \times n}$. - How do we know our computation is correct, in particular if finite-precision arithmetic is employed ? - How do we know how far away we are from the exact solution ? In one of the exercises we already saw that ```math \begin{align} \lambda_i \leq \| A \|_F && \forall i = 1, \dots, n \end{align} ``` but we also noted it to be a rather crude bound. This does, however, point to the fact that the matrix entries have something to say about the matrix eigenvalues. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$1bae37c2-946f-467e-9b1d-c3ca5a129b98„§cell_idÙ$1bae37c2-946f-467e-9b1d-c3ca5a129b98¤codeÚ@md""" !!! tip "Remark" Since the same result holds for $A^T$, we can formulate a version in terms of column sums instead of row sums. ```math \forall \lambda \in \sigma(A) \quad \exists \,j\, \text { s.t. }\, \left|\lambda-A_{j j}\right| \leq \sum_{\substack{i=1 \\ i \neq j}}^{i = n} \left|A_{i j}\right|. ``` """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$7eba1e23-9f38-4478-84f4-e81ef653ba2c„§cell_idÙ$7eba1e23-9f38-4478-84f4-e81ef653ba2c¤codeÙDmd""" ## Gerschgorin circles A first tighter bound is given by """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$8dab1cdf-f700-4dd9-a839-58fe8cfd6c4a„§cell_idÙ$8dab1cdf-f700-4dd9-a839-58fe8cfd6c4a¤codeÚ8begin using PlutoUI import TikzPictures.TikzPicture using LaTeXStrings using LinearAlgebra using PlutoTeachingTools using Plots using HypertextLiteral RobustLocalResource("https://teaching.matmat.org/error-control/latex_macros.md", "latex_macros.md") Markdown.parse(read("latex_macros.md", String)) end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$760385db-cc30-40c1-8f66-5692028a96e3„§cell_idÙ$760385db-cc30-40c1-8f66-5692028a96e3¤code±TableOfContents()¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$4eb5e944-000f-4755-b039-63591d1dab8a„§cell_idÙ$4eb5e944-000f-4755-b039-63591d1dab8a¤codeÚ%md""" Note that Corollary 5 does not give a useful bound if $\delta = 0$, which can happen for degenerate eigenvalues. Given a sufficiently good eigenvector $\tilde{v}$ **Kato-Temple-type bounds** are considerably **sharper** than Bauer-Fike bounds. Their main complication is that the gap $\delta$ requires access to the **exact** eigenvalue and is thus usually not directly computable. However, one can usually determine an approximate gap as we will detail below. - Let us assume a diagonalization routine yields approximate eigenvectors $\tilde{v}_{1}, \ldots, \tilde{v}_{n}$ with eigenvalue approximations $\tilde{\lambda}_{1}, \ldots, \tilde{\lambda}_{n}$ and residuals $\tilde{r}_{1}, \ldots, \tilde{r}_{n}$. We further assume that we have not lost any eigenpair, i.e. $\tilde{λ}_i$ approximates $λ_i$ for all $i = 1, \ldots, n$. - **A naive idea** to approximate the gap $\delta$ for eigenvalue $\lambda_{i}$ is to take ```math \delta_{\text {est}}=\min \left(\left|\tilde{\lambda}_{i-1}- \tilde{\lambda}_{i}\right|,\left|\tilde{\lambda}_{i}-\tilde{\lambda}_{i+1}\right|\right) ``` While this *can be* a good approximation, a disadvantage of this approach is that this expression **is not a guaranteed lower bound** to $\delta$. In particular it may happen that $\delta_{\text {est}} > \delta$, which implies that $\left\|r_{i}\right\|^{2} / \delta_{\text{est}}$ may be smaller than the actual error ! The Kato-Temple estimate is **no longer a guaranteed bound**. - To see this pictorially, let us assume for simplicity that all exact eigenvalues are simple. We want to bound $|\lambda-\tilde{\lambda}_{i} |$ by Kato-Temple, and where the exact gap $\delta=\min \left(\left|\tilde{\lambda}_{i}-\lambda_{i+1}\right|,\left|\tilde{\lambda}_{i}-\lambda_{i-1}\right|\right)$. Then it can happen that: """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a3e89cc9-55b6-423f-874a-b923026847ea„§cell_idÙ$a3e89cc9-55b6-423f-874a-b923026847ea¤codeÚjmd""" > *Proof.* > Let $\lambda$ be the closest eigenvalue to $\tilde \lambda$. > If $\lambda<\tilde{\lambda}$, take $\alpha=\lambda$ and $\beta=b$ in Lemma 3.3 to yield > ```math > \begin{align} > 0 &\leq(b-\tilde{\lambda})(\tilde{\lambda}-\lambda) \leq\|r\|^{2}_2 \\ > \Rightarrow \quad 0 &\leq \tilde{\lambda}-\lambda \leq \frac{\|r\|^{2}_2}{b- \tilde{\lambda}} > \end{align} > ``` > Otherwise, set $\alpha=a$ and $\beta=\lambda$ to obtain > ```math > 0 \leq \lambda-\tilde{\lambda} \leq \frac{\| r \|^{2}_2}{\tilde{\lambda}-a} > ``` > Combining both results completes the proof. > $\hspace{7cm} \square$ """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$c00bddac-a453-4831-81be-d5814a7e88b9„§cell_idÙ$c00bddac-a453-4831-81be-d5814a7e88b9¤codeÙ!md""" # Bounds on Eigenvalues """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$50024c47-f094-4fed-8ec1-1861a982a49a„§cell_idÙ$50024c47-f094-4fed-8ec1-1861a982a49a¤codeÙŽM = [ 1.0 M12 M13 M14 0.0; M12 2.0 M23 0.0 -0.10; M13 M23 3.0 0.1 0.05; M14 0.0 0.1 4.0 0.0; 0.0 -0.1 0.05 0.0 5.0 ];¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a7e14252-02ee-49c1-9f46-5699cf590923„§cell_idÙ$a7e14252-02ee-49c1-9f46-5699cf590923¤codeÚmd""" - Plot Geschgorin disks: $(@bind show_geschgorin PlutoUI.CheckBox(default=true)) - Plot Bauer-Fike estimate: $(@bind show_bauer_fike PlutoUI.CheckBox(default=true)) - Plot Kato-Temple estimate: $(@bind show_kato_temple PlutoUI.CheckBox(default=true)) """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832„§cell_idÙ$2d7cbb67-5c7a-455c-8c19-e9b9e8f4b832¤codeÚëbegin geschgorin_centres = diag(M) geschgorin_radii = [sum(abs, row) - abs(row[i]) for (i, row) in enumerate(eachrow(M))] computed_eigenvalues = diag(M) exact_eigenvalues = eigvals(M) computed_eigenvectors = collect(eachcol(Matrix{Float64}(I, 5, 5))) residuals = map(computed_eigenvalues, computed_eigenvectors) do λ, v M * v - λ * v end error_Bauer_Fike = norm.(residuals) δ = map(1:size(M, 2)) do i δ_left = δ_right = Inf λtilde = computed_eigenvalues if i > 1 δ_left = abs(λtilde[i] - λtilde[i-1]) - norm(residuals[i-1]) end if i < size(M, 2) δ_right = abs(λtilde[i] - λtilde[i+1]) - norm(residuals[i+1]) end max(0.0, min(δ_left, δ_right)) end error_Kato_Temple = norm.(residuals).^2 ./ δ end;¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$45f6befb-4518-4467-81f3-ecd6da88ccbb„§cell_idÙ$45f6befb-4518-4467-81f3-ecd6da88ccbb¤codeÚUmd""" - M12 = $(@bind M12 PlutoUI.Slider(-1.0:0.001:1.0; default=0.001, show_value=true)) - M13 = $(@bind M13 PlutoUI.Slider(-1.0:0.001:1.0; default=0.1, show_value=true)) - M14 = $(@bind M14 PlutoUI.Slider(-1.0:0.001:1.0; default=0.1, show_value=true)) - M23 = $(@bind M23 PlutoUI.Slider(-1.0:0.001:1.0; default=-0.05, show_value=true)) """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$1b5e1cf6-e041-4311-9d9a-1db6cb628a3e„§cell_idÙ$1b5e1cf6-e041-4311-9d9a-1db6cb628a3e¤codeÚ¬md""" !!! note "Theorem 6" Let $\tilde{v}$ be an approximate eigenvector to $A$, $\|\tilde{v}\|=1, \tilde{\lambda}=\langle\tilde{v}, A \tilde{v}\rangle$, and $r=A \tilde{v}-\tilde{\lambda} \tilde{v}$. Let $\lambda$ be the eigenvalue closest to $\tilde{\lambda}$ and $\delta=\min _{i} \{|\lambda_{i}-\tilde{\lambda}|, \lambda_{i} \neq \lambda \}$ be the distance from the spectrum (gap). Let $v$ be an eigenvector of $A$ associated with $\lambda$. Recall that $\theta(x, y)$, the angle between two vectors, is defined as ```math \cos \theta(x, y)=\frac{|\langle x, y\rangle|}{\|x\|\|y\|}. ``` Then, ```math \sin \theta(\tilde{v}, v) \leq \frac{\|r\|_{2}}{\delta} ``` """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$9107b5a1-5768-436d-b705-6b9215121aa0„§cell_idÙ$9107b5a1-5768-436d-b705-6b9215121aa0¤code¿TODO("Summary on other bounds")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$1309b18d-e2f0-46fa-8e0c-3a2730d69d20„§cell_idÙ$1309b18d-e2f0-46fa-8e0c-3a2730d69d20¤codeÚémd""" !!! note "Theorem 1 (Gerschgorin circles)" Any eigenvalue $\lambda$ of a matrix $A$ is located in one of the closed disks of the complex plane centred at $A_{i i}$ and having the radius ```math \sum_{\substack{j=1 \\ j \neq i}}^{j=n} \left|A_{i j}\right| \text {. } ``` In other words, ```math \forall \lambda \in \sigma(A) \quad \exists\, i\, \text{ s.t. }\, \left|\lambda-A_{i i}\right| \leq \sum_{\substack{j=1 \\ j \neq i}}^{j=n}\left|A_{i j}\right| \tag{1} ``` """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$f6e33422-d41e-4444-b08b-b281f5eb0db3„§cell_idÙ$f6e33422-d41e-4444-b08b-b281f5eb0db3¤codeÚÙTikzPicture(L""" \draw[>=latex, ->] (0,0) -- (10,0) node[right]{$\sigma(A)$}; \draw[red, dotted] (3,0) -- (3,-1) (5.1,0) -- (5.1,-2) (6.3,-2) -- (6.3,0) ; \draw[purple, dotted] (3.4,0) -- (3.4,1) (5.1,0) -- (5.1,1) ; \draw (0.5,0) node{$\times$} node[above]{$\lambda_{i-3}$}; \draw[blue] (0.5 + 0.2,0) node{$\times$} node[below]{$\tilde \lambda_{i-3}$}; \draw (1.5,0) node{$\times$} node[above]{$\lambda_{i-2}$}; \draw[blue] (1.5 + 0.2,0) node{$\times$} node[below]{$\tilde \lambda_{i-2}$}; \draw (3,0) node{$\times$} node[above]{$\lambda_{i-1}$}; \draw[blue] (3 + 0.4,0) node{$\times$} node[below]{$\tilde \lambda_{i-1}$}; \draw (4.5,0) node{$\times$} node[above]{$\lambda_{i}$}; \draw[blue] (4.5 + 0.6,0) node{$\times$} node[below]{$\tilde \lambda_{i}$}; \draw (6.3,0) node{$\times$} node[above]{$\lambda_{i+1}$}; \draw[blue] (6.3 + 1.1,0) node{$\times$} node[below]{$\tilde \lambda_{i+1}$}; \draw (8.5,0) node{$\times$} node[above]{$\lambda_{i+2}$}; \draw[blue] (8.5 + 0.4,0) node{$\times$} node[below]{$\tilde \lambda_{i+2}$}; \draw[red] (3,-1) node{|} -- node[below]{$\tilde \lambda_i - \lambda_{i-1}$} (5.1,-1) node{|} ; \draw[red] (5.1,-2) node{|} -- node[below]{$\tilde \lambda_i - \lambda_{i+1} = \delta$} (6.3,-2) node{|} ; \draw[purple] (5.1,1) node{|} -- node[above]{$\tilde \lambda_i - \tilde \lambda_{i-1} = \delta_{\rm{est}} > \delta $} (3.4,1) node{|}; """,width="23cm",options="scale=1",preamble=raw"\usepackage{amsfonts}")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$9c189c48-497e-43c1-a50e-fc1ebe7f0714„§cell_idÙ$9c189c48-497e-43c1-a50e-fc1ebe7f0714¤codeÚmd""" The disks defined in this theorem are called **Gerschgorin disks**. There are $n$ disks and their union contains the spectrum of $A$. Gerschgorin disks are particularly useful when the matrix is almost diagonal, i.e. when a diagonalization algorithm is close to convergence. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$f9cdf1eb-e803-48be-ab67-cd81fc33be3e„§cell_idÙ$f9cdf1eb-e803-48be-ab67-cd81fc33be3e¤codeÚ©md""" !!! note "Corollary 5 (Symmetric version of Kato-Temple)" Let $\tilde{v}$ be an approximate eigenvector to $A$, $\|\tilde{v}\|=1, \tilde{\lambda}=\langle\tilde{v}, A \tilde{v}\rangle$ and $r=A \tilde{v}-\tilde{\lambda} \tilde{v}$. Let $\lambda_i$ be the eigenvalue closest to $\tilde \lambda$. We define the distance of $\tilde{\lambda}$ to the rest of the spectrum as ```math \delta=\min _{j,\, j\neq i} |\lambda_{j}-\tilde{\lambda} | . ``` $\delta$ is also sometimes called the **gap**. Then, ```math |\tilde{\lambda}-\lambda| \leq \frac{\|r\|_{2}^{2}}{\delta}. ``` > *Proof.* > Theorem 3.4 with $a=\tilde{\lambda}-\delta$ and $b=\tilde{\lambda}+\delta$. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$bf7bc022-c5d2-40a1-ae48-731ee97d9a32„§cell_idÙ$bf7bc022-c5d2-40a1-ae48-731ee97d9a32¤codeÚmd""" This is a simple way to get general error bound by establishing a **residual-error relationship**, i.e. a relation between the residual as a computable check for convergence and the error of our quantity of interest against the exact result. We will note that there is no need to know the exact result ! !!! tip "Remark" In general in *a posteriori* error analysis we want to establish relationship ```math \|e\|_{p} \leq C \|r\|_{q} ``` where $e$ is the **error against the exact answer**, $r$ the **residual**, and $C$ a known and computable constant. **Which norms** $p$ and $q$ are the best choice *depends on context*. For example, for measuring the error in the eigenvector we might choose the $\infty$-norm if we are interested in **entry-wise error**, or the 2-norm if we are interested in the error **natural to the vector space** $\mathbb{C}^{n}$. Note that there is no reason for $q$ or $C$ to be identical in both cases. This suggests the following important point: error-residual relationships are not unique. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedënotebook_idÙ$2608c9f0-c61f-11f0-37ab-01d21e1ec409¥bonds€¬cell_resultsÞ !Ù$3ec0e31c-3d09-43d1-9d9a-506320f7d964Цqueued¤logs�§running¦output†¤bodyÚ
Theorem 4 (Kato-Temple)
Let $\tilde{v}$ be an approximate eigenvector to $A$, $\|\tilde{v}\|=1, \tilde{\lambda}=\langle\tilde{v}, A \tilde{v}\rangle$, and $r=A \tilde{v}-\tilde{\lambda} \tilde{v}.$ Assume we know an interval $(a, b)$ with $\tilde{\lambda} \in(a, b)$ and where $\lambda$ is the only eigenvalue of $A$ in $(a, b)$. Then,
$$ \frac{\|r\|_{2}^{2}}{a-\tilde{\lambda}} \leq \tilde{\lambda}-\lambda \leq \frac{\|r\|_{2}^{2}}{b-\tilde{\lambda}}$$
Proof. We set $\theta \equiv \theta(v, \tilde{v})$ and write $\tilde{v}=v \cos \theta+w \sin \theta$, where $w \perp v$ is chosen appropriately. We have
$$ \begin{align} (A-\tilde{\lambda} I) \tilde{v} & =\cos \theta(A-\tilde{\lambda} I) v +\sin \theta(A-\tilde{\lambda} I) w \\ & =\cos \theta({ \lambda} -\tilde{\lambda}) v+\sin \theta(A-\tilde{\lambda} I) w \end{align}$$
Note that
$$ \begin{align} \langle v, (A-\tilde{\lambda} I) w \rangle & =\langle(A-\tilde{\lambda} I) v, w\rangle \\ & =(\lambda-\tilde{\lambda})\langle v, w\rangle=0, \end{align}$$
i.e. the two vectors in the previous sum are orthogonal. Therefore
$$ \begin{align} \|r \|_{2}^{2} & = \| (A-\tilde{\lambda} I ) \tilde{v} \|_{2}^{2} \\ & =\cos ^{2} \theta \ |\lambda-\tilde{\lambda}|^{2}+\sin ^{2} \theta \ \|(A-\tilde{\lambda} I) w\|_{2}^{2} \end{align}$$
Hence,
$$ \sin ^{2} \theta\|(A-\tilde{\lambda} I) w\|_{2}^{2} \leq\|r\|_{2}^{2}$$
Since $w \perp v$,
$$ \begin{aligned} \|(A-\tilde{\lambda} I) w\|_{2} & =\left\|\sum_{\substack{i=1 \\ \lambda_{i} \neq \lambda}}^{n}\left(\lambda_{i}-\tilde{\lambda}\right) v_{i} v_{i}^{H} w\right\|_{2} \\ & \geq \min _{\substack{i=1, \dots, n \\ \lambda_i \neq \lambda}}\left|\lambda_{i}-\tilde{\lambda}\right|=\delta \end{aligned}$$
This concludes the proof. $\hspace{11cm} \square$
Lemma 3
Let $\tilde{v}$ be an approximate eigenvector of a Hermitian matrix $A$ with (for simplicity) $\|\tilde{v}\| = 1$. Let $\tilde \lambda$ be the associated approximated eigenvalue, calculated from $\tilde{\lambda}=\langle\tilde{v}, A \tilde{v}\rangle=R_{A}(\tilde{v})$. Further let $(\alpha, \beta)$ be an interval that contains no eigenvalue of $A$, but let $\tilde{\lambda} \in(\alpha, \beta)$. Then
$$(\beta-\tilde{\lambda})(\tilde{\lambda}-\alpha) \leq\|r\|_{2}^{2} .$$
Consider the near-diagonal matrix
M = $\begin{equation} \left[ \begin{array}{ccccc} 1.0 & 0.001 & 0.099 & 0.099 & 0.0 \\ 0.001 & 2.0 & -0.051 & 0.0 & -0.1 \\ 0.099 & -0.051 & 3.0 & 0.1 & 0.05 \\ 0.099 & 0.0 & 0.1 & 4.0 & 0.0 \\ 0.0 & -0.1 & 0.05 & 0.0 & 5.0 \\ \end{array} \right] \end{equation} $
with some Sliders to tune the off-diagonal elements, shown below. As approximate eigenvectors we assume the unit vectors, that is $\tilde{v}_i = e_i$. As a result the corresponding approximate eigenvalues are just
$$ R_M(\tilde{v}_i) = \tilde{v}_i^T M \tilde{v}_i = M_{ii},$$
i.e. the diagonal entries of $M$.
Proof.
First notice $r \perp \tilde{v}$ :
$$\begin{align*} \langle\tilde{v}, r\rangle & =\left\langle\tilde{v}, A \tilde{v}-\tilde{\lambda}\, \tilde{v}\right\rangle \\ & =\Big\langle\tilde{v}, A \tilde{v}-\left\langle\tilde{v}, A \tilde{v}\right\rangle \tilde{v}\Big\rangle \\ & =\langle\tilde{v}, A \tilde{v}\rangle-\langle\tilde{v}, A \tilde{v}\rangle=0 \tag{4} \end{align*}$$
Using this result as well as the trick of adding and subtracting $\tilde{\lambda} \tilde{v}$:
$$\begin{align} \Big\langle(A-\alpha I) \, \tilde{v}, (A-\beta I) \, \tilde{v}\Big\rangle &=\Big\langle(A-\tilde{\lambda} I)\, \tilde{v} +(\tilde{\lambda}-\alpha)\, \tilde v,\\ &\hspace{50pt} (A-\tilde{\lambda} I) \, \tilde{v}+(\tilde{\lambda}-\beta)\, \tilde{v} \Big\rangle \\ & =\Big\langle r+(\tilde{\lambda}-\alpha) \tilde{v},\ r+(\tilde{\lambda}-\beta) \tilde{v}\Big\rangle \\ & \stackrel{(4)}{=}\|r\|_{2}^{2}+(\tilde{\lambda}-\alpha)(\tilde{\lambda}-\beta). \tag{5} \end{align}$$
Now expand $\tilde{v}$ in an eigenbasis of $A$, i.e.
$$\tilde{v}=\sum_{i=1}^{n} c_{i} v_{i}$$
where $v_i$ is an eigenvector of $A$ with associated eigenvalue $\lambda_i$.
This yields for the left-hand side of (5)
$$\begin{align} \big\langle(A-\alpha I) \, \tilde v,\ (A-\beta I) \, \tilde{v}\big\rangle & =\sum_{i=1}^{n}\left|c_{i}\right|^{2}\,(\lambda_i -\alpha)(\lambda_i -\beta) \\ & \geq 0 \end{align}$$
since the interval $(\alpha, \beta)$ contains no eigenpairs.
Considering the right-hand side of (5), we obtain
$$\|r\|_{2}^{2}+(\tilde{\lambda}-\alpha)(\tilde{\lambda}-\beta) \geq 0$$
which is the desired result. $\hspace{10cm} \square$
Theorem 2 (Bauer-Fike)
Let $A \in \mathbb{C}^{n \times n}$ Hermitian and let $(\tilde{\lambda}, \tilde{v})$ be an approximate eigenpair with $\|\tilde{v}\|_{2}=1$ and residual $r=A \tilde{v}-\tilde{\lambda} \tilde{v}$. Then, there exists an eigenvalue $\lambda$ of $A$ such that
$$ \left|\lambda- \tilde \lambda \right| \leq\|r\|_{2} .$$
Proof.
If $\tilde{\lambda} \in \sigma(A)$ the result is trivial.
Suppose $\tilde{\lambda}$ is not on eigenvalue of $A$. Then $A-\tilde{\lambda} I$ is invertible, thus we write
$$\begin{align} \tilde{v} & =(A-\tilde{\lambda} I)^{-1} r \\ & = U \, (D-\tilde{\lambda} I)^{-1} \, U^{-1} \, r \tag{3} \end{align}$$
where in the last step we used that $A$ is Hermitian, thus it can be diagonalised as $A=U D U^{-1}$ with $U$ unitary.
Taking the 2-norm on both sids of (3) yields
$$\begin{aligned} 1 =\|\tilde{v}\|_2 & =\left\|U\,(D-\tilde{\lambda} I)^{-1}\, U^{-1}\, r\right\|_2 \\ & \leq \underbrace{\|U\|_{2}}_{=1} \ \| (D -\tilde{\lambda} I)^{-1}\|_{2} \ {\underbrace{\left\|U^{-1}\right\|_{2}}_{=1}} \, \| r \|_{2} \\ & =\max _{i=1,\dots,n} \left|\lambda_{i}-\tilde{\lambda}\right|^{-1} \|r\|_{2} \end{aligned}$$
Since $\text{argmin}_{i}\, x_{i}=\text{argmax}_i \, x_i^{-1}$, we obtain
$$\min _{i=1, \ldots, n}\left|\lambda_{i}- \tilde \lambda \right| \leq\|r\|_{2}$$
as desired. $\hspace{12cm} \square$
To avoid this problem, we can use Theorem 2 (Bauer-Fike) to obtain a guaranteed lower bound on the gap. For example:
$$ \begin{align} \left|\tilde{\lambda}_{i}-\lambda_{i+1}\right| & =\left|\tilde{\lambda}_{i}-\tilde{\lambda}_{i+1}+\tilde{\lambda}_{i+1}-\lambda_{i+1}\right| \\ & \stackrel{\text{rev.}~\Delta}{\geq}\left|\tilde{\lambda}_{i}-\tilde{\lambda}_{i+1}\right|-\left|\tilde{\lambda}_{i+1}-\lambda_{i+1}\right| \\ & \hspace{-0.5em} \stackrel{\text{Thm 2}}{\geq}\left|\tilde{\lambda}_{i}-\tilde{\lambda}_{i+1}\right|-\left\|r_{i+1}\right\|_{2} \end{align}$$
and similarly for $\left|\tilde{\lambda}_{i}-\lambda_{i-1}\right|$.
This results in computable lower bounds to $\left|\tilde{\lambda}_{i}-\lambda_{i+1}\right|$ and $\left|\tilde{\lambda}_{i}-\lambda_{i-1}\right|$, thus $\delta$. Using this gap estimate thus yields a guaranteed upper bound to $\left\|r_{i}\right\|^{2} / \delta$.
Note that when $\lambda_i$ and $\lambda_{i+1}$ are too close, this estimate can be negative, thus not a valid lower bound for $\delta$.
Suppose now we have obtained an approximate eigenpair $(\tilde{\lambda}, \tilde{v})$ to $A$. We can define the residual
$$r=A \tilde{v}-\tilde{\lambda} \tilde{v}$$
which can be computed and employed as a stopping criterion in iterations.
Our goal now is to relate the residual $r$ to the error on the eigenvalue, $|\lambda-\tilde{\lambda}|$.
Proof by contradiction.
Assume (1) does not hold. Then there is an eigenvalue $\lambda$ such that, for all $i=1, \dots, n$,
$$ \left|\lambda-A_{i i}\right| > \sum_{\substack{j=1 \\ j \neq i}}^{j=n} \left|A_{i j}\right| \text {. } \tag{2}$$
We then write
$$A-\lambda I=D-\lambda I+H,$$
with $D=\operatorname{diag}\left(A_{11}, \ldots, A_{i i}, \ldots, A_{n n}\right)$ and $H=A-D$ (i.e. zero on the diagonal).
Due to (2), $D - \lambda I$ is invertible, thus
$$ A-\lambda I=(D-\lambda I)\Big(I+\underbrace{(D-\lambda I)^{-1} H}_{M}\Big)$$
The elements of $M$ are
$$ M_{i j}= \begin{cases}0 & \text{if } i=j \\ \frac{A_{i j}}{A_{i i}-\lambda} & \text {otherwise }\end{cases}$$
Due to (2), we thus have $\sum_{j=1}^{n}\left|M_{i j}\right|<1$ $\forall i$, therefore $\|M\|_{\infty}< 1$, and $\varrho(M) < \|M\|_{\infty}<1$.
Since $\varrho(M)$ bounds the modulus of the eigenvalues of $M$, we have that $I+M$ is non-singular, which implies $A-\lambda I$ is non-singular. Therefore $\lambda$ cannot be an eigenvalue of $A$.
This contradicts our initial statement. $\hspace{7cm} \square$
In fact in many practical examples such as Herbst, Levitt, Cances 2020, Figure 7 one sees that Bauer-Fike does not follow the convergence behaviour of the true error.
In fact for our case a better bound is the Kato-Temple bound, which we will derive next.
Suppose we have computed an approximate eigenpair $(\tilde \lambda, \tilde u)$ of a Hermitian matrix $A \in \mathbb C^{n \times n}$.
How do we know our computation is correct, in particular if finite-precision arithmetic is employed ?
How do we know how far away we are from the exact solution ?
In one of the exercises we already saw that
$$\begin{align} \lambda_i \leq \| A \|_F && \forall i = 1, \dots, n \end{align}$$
but we also noted it to be a rather crude bound. This does, however, point to the fact that the matrix entries have something to say about the matrix eigenvalues.
Remark
Since the same result holds for $A^T$, we can formulate a version in terms of column sums instead of row sums.
$$\forall \lambda \in \sigma(A) \quad \exists \,j\, \text { s.t. }\, \left|\lambda-A_{j j}\right| \leq \sum_{\substack{i=1 \\ i \neq j}}^{i = n} \left|A_{i j}\right|.$$
A first tighter bound is given by
$$\def\resolvent{{\rho}} \def\spectralradius{{\varrho}} \def\laplacian{{\Delta}} \def\contour{C} \def\eigenspace{{\mathcal E}} \def\op{\mathcal} \def\opA{{\mathcal A}} \def\opH{{\mathcal H}} \def\hilbert{{\mathscr H}} \def\graph{G} \def\boundedoperators{\mathscr B} \def\bloch{\mathcal B} \def\indicator{{\mathbf 1}} \def\im{\operatorname{Im}} \def\ker{\operatorname{Ker}} \definecolor{noteblue}{RGB}{123, 145, 178} \definecolor{warnyellow}{RGB}{165, 159, 116} \definecolor{prooftext}{RGB}{85, 85, 85}$$
Note that Corollary 5 does not give a useful bound if $\delta = 0$, which can happen for degenerate eigenvalues.
Given a sufficiently good eigenvector $\tilde{v}$ Kato-Temple-type bounds are considerably sharper than Bauer-Fike bounds. Their main complication is that the gap $\delta$ requires access to the exact eigenvalue and is thus usually not directly computable. However, one can usually determine an approximate gap as we will detail below.
Let us assume a diagonalization routine yields approximate eigenvectors $\tilde{v}_{1}, \ldots, \tilde{v}_{n}$ with eigenvalue approximations $\tilde{\lambda}_{1}, \ldots, \tilde{\lambda}_{n}$ and residuals $\tilde{r}_{1}, \ldots, \tilde{r}_{n}$. We further assume that we have not lost any eigenpair, i.e. $\tilde{λ}_i$ approximates $λ_i$ for all $i = 1, \ldots, n$.
A naive idea to approximate the gap $\delta$ for eigenvalue $\lambda_{i}$ is to take
$$\delta_{\text {est}}=\min \left(\left|\tilde{\lambda}_{i-1}- \tilde{\lambda}_{i}\right|,\left|\tilde{\lambda}_{i}-\tilde{\lambda}_{i+1}\right|\right)$$
While this can be a good approximation, a disadvantage of this approach is that this expression is not a guaranteed lower bound to $\delta$. In particular it may happen that $\delta_{\text {est}} > \delta$, which implies that $\left\|r_{i}\right\|^{2} / \delta_{\text{est}}$ may be smaller than the actual error ! The Kato-Temple estimate is no longer a guaranteed bound.
To see this pictorially, let us assume for simplicity that all exact eigenvalues are simple. We want to bound $|\lambda-\tilde{\lambda}_{i} |$ by Kato-Temple, and where the exact gap $\delta=\min \left(\left|\tilde{\lambda}_{i}-\lambda_{i+1}\right|,\left|\tilde{\lambda}_{i}-\lambda_{i-1}\right|\right)$. Then it can happen that:
Proof. Let $\lambda$ be the closest eigenvalue to $\tilde \lambda$. If $\lambda<\tilde{\lambda}$, take $\alpha=\lambda$ and $\beta=b$ in Lemma 3.3 to yield
$$ \begin{align} 0 &\leq(b-\tilde{\lambda})(\tilde{\lambda}-\lambda) \leq\|r\|^{2}_2 \\ \Rightarrow \quad 0 &\leq \tilde{\lambda}-\lambda \leq \frac{\|r\|^{2}_2}{b- \tilde{\lambda}} \end{align}$$
Otherwise, set $\alpha=a$ and $\beta=\lambda$ to obtain
$$ 0 \leq \lambda-\tilde{\lambda} \leq \frac{\| r \|^{2}_2}{\tilde{\lambda}-a}$$
Combining both results completes the proof. $\hspace{7cm} \square$
Plot Geschgorin disks:
Plot Bauer-Fike estimate:
Plot Kato-Temple estimate:
M12 =
M13 =
M14 =
M23 =
Theorem 6
Let $\tilde{v}$ be an approximate eigenvector to $A$, $\|\tilde{v}\|=1, \tilde{\lambda}=\langle\tilde{v}, A \tilde{v}\rangle$, and $r=A \tilde{v}-\tilde{\lambda} \tilde{v}$. Let $\lambda$ be the eigenvalue closest to $\tilde{\lambda}$ and $\delta=\min _{i} \{|\lambda_{i}-\tilde{\lambda}|, \lambda_{i} \neq \lambda \}$ be the distance from the spectrum (gap). Let $v$ be an eigenvector of $A$ associated with $\lambda$. Recall that $\theta(x, y)$, the angle between two vectors, is defined as
$$ \cos \theta(x, y)=\frac{|\langle x, y\rangle|}{\|x\|\|y\|}.$$
Then,
$$ \sin \theta(\tilde{v}, v) \leq \frac{\|r\|_{2}}{\delta}$$
Summary on other bounds
Theorem 1 (Gerschgorin circles)
Any eigenvalue $\lambda$ of a matrix $A$ is located in one of the closed disks of the complex plane centred at $A_{i i}$ and having the radius
$$ \sum_{\substack{j=1 \\ j \neq i}}^{j=n} \left|A_{i j}\right| \text {. }$$
In other words,
$$ \forall \lambda \in \sigma(A) \quad \exists\, i\, \text{ s.t. }\, \left|\lambda-A_{i i}\right| \leq \sum_{\substack{j=1 \\ j \neq i}}^{j=n}\left|A_{i j}\right| \tag{1}$$
The disks defined in this theorem are called Gerschgorin disks. There are $n$ disks and their union contains the spectrum of $A$. Gerschgorin disks are particularly useful when the matrix is almost diagonal, i.e. when a diagonalization algorithm is close to convergence.