# Thread: creating a nxn matrix for LU factorization

1. ## creating a nxn matrix for LU factorization

Hi!

I'm trying to decipher this question so I can manipulate a matrix for LU factorization as well as find the infinity norm and error mag. but I don't how to create the matrix based on the question:

Consider the n x n matrix with entries $A_{ij} = \frac{1}{(i + 2j - 1)}$, set $x = [1,...,1]^T$ , and $b = Ax$. ("b" and "x" are in bold).

I need to work with the 3 x 3, 5 x 5, 10 x 10, and 15 x 15 matrices but how do I find them based on the above?

2. Originally Posted by donnagirl
Hi!

I'm trying to decipher this question so I can manipulate a matrix for LU factorization as well as find the infinity norm and error mag. but I don't how to create the matrix based on the question:

Consider the n x n matrix with entries $A_{ij} = \frac{1}{(i + 2j - 1)}$, set $x = [1,...,1]^T$ , and $b = Ax$. ("b" and "x" are in bold).

I need to work with the 3 x 3, 5 x 5, 10 x 10, and 15 x 15 matrices but how do I find them based on the above?
By using that formula. When i= j= 1, $A_{11}= \frac{1}{1+2-1}= \frac{1}{2}$. When i= 1, j= 2, $A_{12}= \frac{1}{1+ 4- 1}= \frac{1}{4}$. When i= 1, j= 3, [tex]A_{12}= \frac{1}{1+ 6- 1}= \frac{1}{6}.

When i= 2, j= 1, $A_{21}= \frac{1}{2+ 2- 1}= \frac{1}{3}$. When i= 2, j= 2, $A_{22}= \frac{1}{2+ 4- 1}= \frac{1}{5}$. When i= 2, j= 3, $A_{23}= \frac{1}{2+ 6- 1}= \frac{1}{7}$.

When i= 3, j= 1, $A_{31}= \frac{1}{3+ 2- 1}= \frac{1}{4}$.
When i= 3, j= 2, $A_{32}= \frac{1}{3+ 4- 1}= \frac{1}{6}$.
When i= 3, j= 3, $A_{33}= \frac{1}{3+ 6- 1}= \frac{1}{8}$.

That is,
$A= \begin{bmatrix}\frac{1}{2} & \frac{1}{3} & \frac{1}{4} \\ \frac{1}{4} & \frac{1}{5} & \frac{1}{6} \\ \frac{1}{6} & \frac{1}{7} & \frac{1}{8}\end{bmatrix}$
is the 3 by 3 matrix. Looks like there is a pretty simple pattern so you should be able to extend that to 5 by 5, 10 by 10, and 15 by 15.

3. Thanks Ivy! So by that pattern, would it be correct to say that the 5x5 matrix is:
$A= \begin{bmatrix}\frac{1}{2} & \frac{1}{3} & \frac{1}{4} & \frac{1}{5} & \frac{1}{6} \\ \frac{1}{6} & \frac{1}{7} & \frac{1}{8} & \frac{1}{9} & \frac {1}{10} \\ \frac{1}{10} & \frac{1}{11} & \frac{1}{12} & \frac{1}{13} & \frac{1}{14} \\ \frac{1}{14} & \frac{1}{15} & \frac{1}{16} & \frac{1}{17} & \frac{1}{18} \\ \frac{1}{18} & \frac{1}{19} & \frac{1}{20} & \frac{1}{21} & \frac{1}{22} \\ \end{bmatrix}$
If that's correct I understand how to form the matrices but how do I obtain the x vector and b vector in the equation? Is the x vector given the one I multiply by A to obtain b??? Also are you sure that those numbers are in the correct positions? I thought the first ROW of any matrix is: $a_{11}$ $a_{12}$ $a_{13}...$

4. I'm not sure that Ivy's matrix is correct based on the regular format of a matrix from my post above. Can someone check this? Also, what do I substitute in for vectors b and x?

5. Originally Posted by donnagirl
Hi!

I'm trying to decipher this question so I can manipulate a matrix for LU factorization as well as find the infinity norm and error mag. but I don't how to create the matrix based on the question:

Consider the n x n matrix with entries $A_{ij} = \frac{1}{(i + 2j - 1)}$, set $x = [1,...,1]^T$ , and $b = Ax$. ("b" and "x" are in bold).

I need to work with the 3 x 3, 5 x 5, 10 x 10, and 15 x 15 matrices but how do I find them based on the above?
I'm totally puzzled how you can ask this question on the one hand and then ask the question here on the other hand: http://www.mathhelpforum.com/math-he...-solution.html