In [1]:
##
using Random
Random.seed!(0) 
A = randn(10,10) |> x -> x + x' # get a random symmetric matrix
Out[1]:
10×10 Matrix{Float64}:
 -0.463818   0.670505  -0.477815   …  -1.84353    1.40771   -0.213596
  0.670505   1.15601   -0.221631       0.163109  -1.47088   -0.538411
 -0.477815  -0.221631   1.90371       -0.550527   1.78206   -1.68827
  3.71885   -0.382635  -0.0343197      2.30853    0.160268   0.546554
 -0.568353  -1.99942   -0.634999      -0.386993   1.79697    0.898182
  3.03331    0.364765  -2.1305     …   0.352134   0.768188   0.102171
 -2.27477   -0.741652  -1.14428       -1.73715   -2.03388    0.713051
 -1.84353    0.163109  -0.550527      -0.998805  -1.11001    2.38461
  1.40771   -1.47088    1.78206       -1.11001    1.03547   -0.988297
 -0.213596  -0.538411  -1.68827        2.38461   -0.988297   0.401778
In [2]:
##
using LinearAlgebra
B = A^(10)/opnorm(A^10)
C = (A/opnorm(A))^10
B ≈ C
Out[2]:
true
In [3]:
##
C = (A/opnorm(A))^1000
Out[3]:
10×10 Matrix{Float64}:
  0.251012    0.0257224    0.0662651    0.186256   …   0.182446   -0.0606247
  0.0257224   0.00263589   0.0067905    0.0190865      0.0186961  -0.0062125
  0.0662651   0.0067905    0.0174934    0.04917        0.0481644  -0.0160044
  0.186256    0.0190865    0.04917      0.138205       0.135379   -0.0449847
 -0.0200418  -0.00205377  -0.00529086  -0.0148714     -0.0145672   0.00484051
  0.128662    0.0131846    0.0339657    0.0954697  …   0.0935172  -0.0310746
 -0.306483   -0.0314067   -0.0809089   -0.227416      -0.222765    0.074022
  0.0202952   0.00207974   0.00535776   0.0150594      0.0147514  -0.00490172
  0.182446    0.0186961    0.0481644    0.135379       0.13261    -0.0440647
 -0.0606247  -0.0062125   -0.0160044   -0.0449847     -0.0440647   0.0146421
In [4]:
##
x = randn(10)
y = C*x / norm(C*x)
z = randn(10)
w = C*z / norm(C*z)
y ≈ w
Out[4]:
false
In [5]:
##
C ≈ y*y'
Out[5]:
true