MATLAB Answers

0

If first and last rows of an orthogonal matrix is known, is it possible to determine remaining orthogonal rows?

Asked by Chandan Roy on 6 Jun 2019
Latest activity Commented on by John D'Errico
on 6 Jun 2019
I need to derive a 7*7orthogonal matrix. I have first and last rows of the required matrix. Here is my first and last row:
[-0.0897 0.6659 -0.7531 0.7545 -0.7141 0.3670 0.0336]
[0.5784 0.2538 0.2871 0.2870 0.2723 0.1565 0.5822]
I tried to derive rest of the rows by converting these rows into reduced echolon form as follows:
[1 0 0.9372 0 0.8888 0.0271 0.9294]
[0 1 -1 1.133 -0.9527 0.5548 0.1756]
I end up in following rows
t2 = [-0.9372 1 1 0 0 0 0];
t3 = [0 -1.133 0 1 0 0 0];
t4 = [-0.8888 0.9527 0 0 1 0 0];
t5 = [-0.0271 -0.5548 0 0 0 1 0];
t6 = [-0.9294 -0.1756 0 0 0 0 1];
I suspect, my answer is not correct. In the book, it's written that it can be done by Gram-Schmidt orthogonalization (GSO) process though I couldn't find how to do that. Any hint in order to solve this problem will be appreciated.

  0 Comments

Sign in to comment.

1 Answer

Answer by John D'Errico
on 6 Jun 2019
Edited by John D'Errico
on 6 Jun 2019
 Accepted Answer

If this is homework, and you need to do this using tools other than null, sorry, you are out of luck. I won't do your homework.
Given only TWO rows of a 7x7 orthogonal matrix, the other 5 rows cannot be computed unambiguously. It is trivial to compute 5 rows that are orthogonal to those two. But the solution is not unique.
A12 = [1 0 0.9372 0 0.8888 0.0271 0.9294;0 1 -1 1.133 -0.9527 0.5548 0.1756];
First, these rows are NOT rows of an orthogonal matrix. Not even close. If they were rows of an orthognal matrix, then they would form a 2x2 identity matrix when I did this. (At least the matrix would be diagonal.)
A12*A12'
ans =
3.5328 -1.6057
-1.6057 4.53
As you see, not close. We can find a pair of vectors that span the subspace spanned by the rows of A12.
A12span = orth(A12.').'
A12span =
0.24813 -0.33686 0.56941 -0.38167 0.54147 -0.18017 0.17146
0.52522 0.38687 0.10536 0.43833 0.098237 0.22887 0.55607
A12span*A12span'
ans =
1 6.1442e-17
6.1442e-17 1
They form a basi for the given subspace. And as I showed, they are now clearly orthogonal to each other. But, how can you produce 5 rows that are orthogonal to them? That part is trivial, if you understand these tools and linear algebra.
Aetc = null(A12)';
Aetc contains 5 rows that are orthogonal to the first two. It is NOT unique. But Aetc does contain a set of 5 orthogonal vectors, that form the nulllspace of A12.
A12*Aetc'
ans =
-5.6499e-17 -5.0291e-18 8.9914e-17 -8.8734e-18 1.0304e-16
-3.4911e-17 1.4416e-16 -4.3053e-17 -3.6445e-17 3.9777e-17
As you can see, these new rows are orthogonal to those we started with (to within floating point trash.) However, as I have said, they are not unique. Here is the set I found from null.
Aetc
Aetc =
-0.44155 0.37035 0.76564 0.14227 -0.22281 0.066519 -0.08584
-0.089566 -0.58121 0.11312 0.77673 0.10813 -0.11176 -0.11785
-0.4184 0.35345 -0.22269 0.13578 0.78829 0.063512 -0.080955
-0.058912 -0.28873 0.051501 -0.11091 0.049266 0.94435 -0.063196
-0.53015 -0.23152 -0.11587 -0.088939 -0.10955 -0.049171 0.79346
But I can randomly rotate them. As you can see, they are different. But they still form an orthogonal basis for the nullspace.
Aetc2 = orth(rand(5))*Aetc
Aetc2 =
0.59296 -0.41116 -0.027373 0.20009 -0.064484 0.34931 -0.55892
0.25207 -0.19553 -0.49276 -0.61913 -0.19405 0.2677 0.40345
-0.31595 -0.18661 -0.40325 0.22085 0.71615 0.37217 0.050869
0.37243 0.44545 -0.42055 -0.177 0.36582 -0.4723 -0.31272
0.094385 -0.54435 -0.28572 0.39843 -0.093004 -0.59992 0.29299
>> Aetc2*Aetc2'
ans =
1 1.8385e-16 -2.4559e-16 6.162e-17 -1.085e-16
1.8385e-16 1 1.9243e-16 -1.2065e-16 2.4558e-16
-2.4559e-16 1.9243e-16 1 7.8167e-18 -2.8819e-16
6.162e-17 -1.2065e-16 7.8167e-18 1 1.6765e-16
-1.085e-16 2.4558e-16 -2.8819e-16 1.6765e-16 1
>> A12*Aetc2'
ans =
1.6735e-16 1.0458e-17 2.3824e-17 2.5912e-17 3.4096e-17
3.8011e-17 -6.4272e-18 -3.6084e-17 -9.3707e-17 8.6515e-17
And as shown, they are still orthogonal to the original set in A12.
Finally, IF the goal is to produce an orthogonal 7x7 matrix, this would do so:
A = [orth(A12')';Aetc];
A is an orthogonal matrix, based on the original rows. As a test of that claim...
A*A'
ans =
1 7.532e-17 -5.9336e-19 -6.0682e-17 4.1989e-17 1.6129e-17 4.086e-17
7.532e-17 1 -8.3428e-17 5.4361e-17 -2.9411e-17 -2.2233e-17 4.4083e-17
-5.9336e-19 -8.3428e-17 1 4.1705e-17 4.5634e-17 6.1926e-18 2.3981e-17
-6.0682e-17 5.4361e-17 4.1705e-17 1 4.5802e-17 -1.7362e-17 7.2233e-19
4.1989e-17 -2.9411e-17 4.5634e-17 4.5802e-17 1 1.6961e-17 -5.3706e-19
1.6129e-17 -2.2233e-17 6.1926e-18 -1.7362e-17 1.6961e-17 1 8.1267e-19
4.086e-17 4.4083e-17 2.3981e-17 7.2233e-19 -5.3706e-19 8.1267e-19 1

  2 Comments

Thank you for your answer. I think I need to elaborate my problem in more details.
I need to derive a matrix M which is real and symmetric about its principal diagonal. This M is expressed by
-M = T.L.T' .......(1)
This L has the eigen values of -M. I have derived them from other calculation as follows:
L = diag([-1.702 -0.9962 -0.4424 0.1309 0.7017 1.05 1.654])
Now I need to find T. where T.T'=I.
The first and last rows of T has been determined as follows (this row values are correct):
[-0.0897 0.6659 -0.7531 0.7545 -0.7141 0.3670 0.0336]
[0.5784 0.2538 0.2871 0.2870 0.2723 0.1565 0.5822]
at this point, I need to find the remaining ortogonal rows. As a result, the T would be like this:
[-0.0897 0.6659 -0.7531 0.7545 -0.7141 0.3670 0.0336]
.
.
.
.
.
[0.5784 0.2538 0.2871 0.2870 0.2723 0.1565 0.5822]
After having this T, from equation (1), the final M can be calculated as follows:
[0.0586 -0.0147 -0.2374 -0.0578 0.4314 -0.4385 0]
[-0.0147 -0.0810 0.4825 0.3890 0.6585 0.0952 -1.3957]
[-0.2374 0.4825 0.2431 -0.0022 0.3243 -0.2075 0.1484]
[-0.0578 0.3890 -0.0022 -0.0584 -0.3047 0.4034 -0.0953]
[0.4314 0.6585 0.3243 -0.3047 0.0053 -0.5498 -0.1628]
[-0.4385 0.0952 -0.2075 0.4034 -0.5498 -0.5848 -0.1813]
[0 -1.3957 0.1484 -0.0953 -0.1628 -0.1813 0.0211]
This problem is regarding synthesis of coupling matrix of a 7th order filter. The book didn't explain well. I can't design of own filter without proper understanding on this M derivation and I'm stuck here badly.
Thank you again for your kind help.
It looks like you have now changed things a bit in your elaboration. You now say:
"Now I need to find T. where T.T'=I.
The first and last rows of T has been determined as follows (this row values are correct):
[-0.0897 0.6659 -0.7531 0.7545 -0.7141 0.3670 0.0336]
[0.5784 0.2538 0.2871 0.2870 0.2723 0.1565 0.5822]"
So my first test is to see if you are correct in your statement. Are they orthogonal?
A12 = [-0.0897 0.6659 -0.7531 0.7545 -0.7141 0.3670 0.0336;
0.5784 0.2538 0.2871 0.2870 0.2723 0.1565 0.5822];
A12*A12'
ans =
2.2337 -2.58e-06
-2.58e-06 1.0014
So they are approximately orthogonal. That are not orthonormal.
You have said repeatedly that T*T' will be an identity matrix. But again, I need to state that for your claim to be true, that the diagonal elements of that product needed to be 1. Do I need to syay this a million times? READ WHAT I TELL YOU! The non-zeros in the off-diagonal terms there can be attributed to that you only gave 4 digits in those vectors. But the 2.2337 term is not 1, and not even close.
Sorry. I get frstrated when someone asks a question, but then seems not to be thinking about the answer they get.
While I could orthogonalize A12, the result would NOT be the same. For example, I can use orth to make them an orthonormal set.
A12span = orth(A12.').'
A12span =
-0.060019 0.44555 -0.5039 0.50484 -0.47781 0.24556 0.022481
-0.57801 -0.25363 -0.2869 -0.28681 -0.27211 -0.1564 -0.58181
Or, I could just normalize those vectors so they have unit norm. But then they will be different vectors, not as you seem to be asking for.
The rest of your question, once you get a pair of vectors that actually have the properties that you state, is easy to do, but, as I said before, M will not be unique.

Sign in to comment.