Files
math6601_projects/project1/Project1_A1.txt
2025-10-21 16:25:27 -04:00

70 lines
2.6 KiB
Plaintext

Question 1(a):
Projection of b onto the column space of A(1): (Using proj function)
[1.85714286 1. 3.14285714 1.28571429 3.85714286]
Projection of b onto the column space of A(1): (Using proj_SVD function)
[1.85714286 1. 3.14285714 1.28571429 3.85714286]
Difference between the two methods:
[ 2.22044605e-16 1.55431223e-15 -4.44089210e-16 2.22044605e-16
-8.88178420e-16]
Question 1(b):
For ε = 1.0:
Projection of b onto the column space of A(1.0):
[1.85714286 1. 3.14285714 1.28571429 3.85714286]
Projection of b onto the column space of A(1.0) using SVD:
[1.85714286 1. 3.14285714 1.28571429 3.85714286]
Difference between the two methods:
[ 2.22044605e-16 1.55431223e-15 -4.44089210e-16 2.22044605e-16
-8.88178420e-16]
For ε = 0.1:
Projection of b onto the column space of A(0.1):
[1.85714286 1. 3.14285714 1.28571429 3.85714286]
Projection of b onto the column space of A(0.1) using SVD:
[1.85714286 1. 3.14285714 1.28571429 3.85714286]
Difference between the two methods:
[ 8.08242362e-14 5.87307980e-14 -8.88178420e-16 4.81836793e-14
-1.37667655e-14]
For ε = 0.01:
Projection of b onto the column space of A(0.01):
[1.85714286 1. 3.14285714 1.28571429 3.85714286]
Projection of b onto the column space of A(0.01) using SVD:
[1.85714286 1. 3.14285714 1.28571429 3.85714286]
Difference between the two methods:
[-4.76907402e-12 -1.84297022e-14 5.53779245e-13 -4.00324218e-12
1.49613655e-12]
For ε = 0.0001:
Projection of b onto the column space of A(0.0001):
[1.85714282 1. 3.14285716 1.28571427 3.85714291]
Projection of b onto the column space of A(0.0001) using SVD:
[1.85714286 1. 3.14285714 1.28571429 3.85714286]
Difference between the two methods:
[-3.59740875e-08 9.10937992e-13 1.94238092e-08 -1.19938544e-08
4.79721098e-08]
For ε = 1e-08:
Projection of b onto the column space of A(1e-08):
[-1.87500007 0.99999993 -3.12499997 -2.62500007 3.49999996]
Projection of b onto the column space of A(1e-08) using SVD:
[1.85714286 1. 3.14285714 1.28571427 3.85714286]
Difference between the two methods:
[-3.73214294e+00 -7.45058057e-08 -6.26785711e+00 -3.91071435e+00
-3.57142909e-01]
For ε = 1e-16:
ValueError for eps=1e-16: Matrix A must be full rank.
Projection of b onto the column space of A(1e-16) using SVD:
[3.4 1. 1.6 1.8 1.8]
Difference between the two methods:
Could not compute difference due to previous error.
For ε = 1e-32:
ValueError for eps=1e-32: Matrix A must be full rank.
Projection of b onto the column space of A(1e-32) using SVD:
[3.4 1. 1.6 1.8 1.8]
Difference between the two methods:
Could not compute difference due to previous error.