@@ -35,7 +35,7 @@ At the same time, these concepts are extremely useful for
35
35
* machine learning
36
36
* and many other fields of science.
37
37
38
- In this lecture we explain the basics of eigenvalues and eigenvectors.
38
+ In this lecture we explain the basics of eigenvalues and eigenvectors and introduce the Neumann Series Lemma .
39
39
40
40
We assume in this lecture that students are familiar with matrices
41
41
and understand {doc}` the basics of matrix algebra<linear_equations> ` .
@@ -791,7 +791,6 @@ When solving $Av = \lambda v$,
791
791
792
792
We will see some examples below.
793
793
794
-
795
794
### Some mathematical details
796
795
797
796
We note some mathematical details for more advanced readers.
@@ -813,8 +812,6 @@ in $\lambda$ of degree $n$.
813
812
This in turn implies the existence of $n$ solutions in the complex
814
813
plane, although some might be repeated.
815
814
816
-
817
-
818
815
### Facts
819
816
820
817
Some nice facts about the eigenvalues of a square matrix $A$ are as follows:
@@ -857,6 +854,118 @@ The eigenvectors and eigenvalues of a map $A$ determine how a vector $v$ is tran
857
854
858
855
This is discussed further later.
859
856
857
+
858
+ (la_neumann)=
859
+ ## The Neumann Series Lemma
860
+
861
+ ``` {index} single: Neumann's Lemma
862
+ ```
863
+
864
+ In this section we present a famous result about series of matrices that has
865
+ many applications in economics.
866
+
867
+ ### Scalar series
868
+
869
+ Here's a fundamental result about series that you surely know:
870
+
871
+ If $a$ is a number and $|a| < 1$, then
872
+
873
+ ``` {math}
874
+ :label: gp_sum
875
+
876
+ \sum_{k=0}^{\infty} a^k =\frac{1}{1-a} = (1 - a)^{-1}
877
+
878
+ ```
879
+
880
+ For a one-dimensional linear equation $x = ax + b$ where x is unknown we can thus conclude that the solution $x^{* }$ is given by:
881
+
882
+ $$
883
+ x^{*} = \frac{b}{1-a} = \sum_{k=0}^{\infty} a^k b
884
+ $$
885
+
886
+ ### Matrix series
887
+
888
+ A generalization of this idea exists in the matrix setting.
889
+
890
+ Consider the system of equations $x = Ax + b$ where $A$ is an $n \times n$
891
+ square matrix and $x$ and $b$ are both column vectors in $\mathbb{R}^n$.
892
+
893
+ Using matrix algebra we can conclude that the solution to this system of equations will be given by:
894
+
895
+ ``` {math}
896
+ :label: neumann_eqn
897
+
898
+ x^{*} = (I-A)^{-1}b
899
+
900
+ ```
901
+
902
+ What guarantees the existence of a unique vector $x^{* }$ that satisfies
903
+ {eq}` neumann_eqn ` ?
904
+
905
+ The following is a fundamental result in functional analysis that generalizes
906
+ {eq}` gp_sum ` to a multivariate case.
907
+
908
+ (neumann_series_lemma)=
909
+ ``` {prf:Theorem} Neumann Series Lemma
910
+ :label: neumann_series_lemma
911
+
912
+ Let $A$ be a square matrix and let $A^k$ be the $k$-th power of $A$.
913
+
914
+ Let $r(A)$ be the **spectral radius** of $A$, defined as $\max_i |\lambda_i|$, where
915
+
916
+ * $\{\lambda_i\}_i$ is the set of eigenvalues of $A$ and
917
+ * $|\lambda_i|$ is the modulus of the complex number $\lambda_i$
918
+
919
+ Neumann's Theorem states the following: If $r(A) < 1$, then $I - A$ is invertible, and
920
+
921
+ $$
922
+ (I - A)^{-1} = \sum_{k=0}^{\infty} A^k
923
+ $$
924
+ ```
925
+
926
+ We can see the Neumann Series Lemma in action in the following example.
927
+
928
+ ``` {code-cell} ipython3
929
+ A = np.array([[0.4, 0.1],
930
+ [0.7, 0.2]])
931
+
932
+ evals, evecs = eig(A) # finding eigenvalues and eigenvectors
933
+
934
+ r = max(abs(λ) for λ in evals) # compute spectral radius
935
+ print(r)
936
+ ```
937
+
938
+ The spectral radius $r(A)$ obtained is less than 1.
939
+
940
+ Thus, we can apply the Neumann Series Lemma to find $(I-A)^{-1}$.
941
+
942
+ ``` {code-cell} ipython3
943
+ I = np.identity(2) #2 x 2 identity matrix
944
+ B = I - A
945
+ ```
946
+
947
+ ``` {code-cell} ipython3
948
+ B_inverse = np.linalg.inv(B) #direct inverse method
949
+ ```
950
+
951
+ ``` {code-cell} ipython3
952
+ A_sum = np.zeros((2,2)) #power series sum of A
953
+ A_power = I
954
+ for i in range(50):
955
+ A_sum += A_power
956
+ A_power = A_power @ A
957
+ ```
958
+
959
+ Let's check equality between the sum and the inverse methods.
960
+
961
+ ``` {code-cell} ipython3
962
+ np.allclose(A_sum, B_inverse)
963
+ ```
964
+
965
+ Although we truncate the infinite sum at $k = 50$, both methods give us the same
966
+ result which illustrates the result of the Neumann Series Lemma.
967
+
968
+
860
969
## Exercises
861
970
862
971
``` {exercise}
0 commit comments