Question: This is a problem about HIlbert Matrix and some part of them have to wrtite python functions The determinant can be surprisingly small even though
This is a problem about HIlbert Matrix and some part of them have to wrtite python functions
The determinant can be surprisingly small even though it has so many terms contributing to it. The nn Hilbert matrix H(ij)=1/(i+j+1) w, for i,j=0,,n1i,is named after Hilbert and has very small determinants.
1. Define explicitly the Hilbert matrix for n = 1, 2, 3 and assign to H1, H2, and H3.
2. Compute their determinants.
3. Let's make a function to construct the nn'th Hilbert matrix.
def HilbertMatrix(n): """Construct the Hilbert matrix of size n (slow but steady).""" H = zeros((n,n), dtype=float) for i in range(n): for j in range(n): ( # fill in the i, j'th matrix element here! ) return H
4. Check that your function matches the first 3 Hilbert matrices that you constructed by hand.
5. Make an array of the determinants of the first 10 Hilbert matrices. (use python)
# create an array of n values from 1 to 10 ns = r_[1:11]
# for loop method # create an empty (zero) matrix of the right shape detHs = zeros_like(ns) for (i,n) in enumerate(ns): detHs[i] = # fill in here!!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
