Inverting a matrix

  • #1
136
12

Summary:

how do be sure a matrix is invertible

Main Question or Discussion Point

Hello

Suppose if have a matrix that is purely diagonal with NO zeros: M (which is n by n -square)

Suppose I have another matrix the contains coordinate information, call it A.
This one is NOT a square matrix, but, (n by m) (where, in general m < n)

I form this: Q = A-transpose * M * A
(where Q is, of course, m by m)

How can I be sure Q is invertible?
 

Answers and Replies

  • #2
13,216
10,111
Summary:: how do be sure a matrix is invertible

Hello

Suppose if have a matrix that is purely diagonal with NO zeros: M (which is n by n -square)

Suppose I have another matrix the contains coordinate information, call it A.
This one is NOT a square matrix, but, (n by m) (where, in general m < n)

I form this: Q = A-transpose * M * A
(where Q is, of course, m by m)

How can I be sure Q is invertible?
What if ##A=0##?
 
  • #3
136
12
What if ##A=0##?
Yes, I see that. That is my point. What restrictions are on A? I can see that is one

But this FINAL matrix Q, is the coefficient in a diff.eq like this

Q x-double-dot = F


(sorry I cannot seem to get latex to put the double dot over the x)

Where Q is the product above.

How can I be sure it is invertible? It seems to always be. The Mass matrix consists of mass and moment of inertia terms on the diagonal



 
  • #5
13,216
10,111
  • #6
13,216
10,111
Say ##m<n## and ##A=\begin{bmatrix}a_{11}&a_{12}&\ldots&a_{1m}\\a_{21}&a_{22}&\ldots&a_{2m}\\ \vdots &\vdots &\ldots &\vdots \\ a_{n1}&a_{n2}&\ldots&a_{nm}\end{bmatrix}##.

Then ##A\, : \,\mathbb{R}^m \longrightarrow \mathbb{R}^n##. Since the vector space on left side is of lower dimension than the vector space on the right , the best we can get is an embedding, i.e. an injective linear transformation ##A##.

Now consider ##A^\tau##. This matrix represents a linear transformation ##A^\tau\, : \,\mathbb{R}^n \longrightarrow \mathbb{R}^m##, i.e. from something with a bigger dimension to something with a lower dimension. So some nonzero vectors have to end up as the zero vector. But then it is not invertible. But if ##A^\tau## isn't, then ##A^\tau MA## isn't either, since you cannot recover a nonzero vector from a zero vector.

Maybe it would help us if you show the original problem. ##A^\tau MA## is never invertible if ##n\neq m##.
 
  • #7
136
12
For LaTeX issue:
https://www.physicsforums.com/help/latexhelp/

Now to your question. ##A## and ##A^\tau## cannot both be injective: if one is, then the other isn't. Hence there is a vector ##x\neq 0## which is sent to zero by either of them, which means ##A^\tau MA## cannot be invertible, except ##m=n##.
OK, I will summon up the courage to reveal how dense I am, with questions

1. This A matrix maps a set of minimal generalized coordinates to Cartesian coordinates. How does one know such a matrix is injective?

2. How do you know that A-transpose is NOT injective

3. WIth the middle term being a diagonal matrix (of no zeros) can you state that there is a proof that the final Q is invertible? The proof is likely beyond me, but I want to know it exists.
Say ##m<n## and ##A=\begin{bmatrix}a_{11}&a_{12}&\ldots&a_{1m}\\a_{21}&a_{22}&\ldots&a_{2m}\\ \vdots &\vdots &\ldots &\vdots \\ a_{n1}&a_{n2}&\ldots&a_{nm}\end{bmatrix}##.

Then ##A\, : \,\mathbb{R}^m \longrightarrow \mathbb{R}^n##. Since the vector space on left side is of lower dimension than the vector space on the right , the best we can get is an embedding, i.e. an injective linear transformation ##A##.

Now consider ##A^\tau##. This matrix represents a linear transformation ##A^\tau\, : \,\mathbb{R}^n \longrightarrow \mathbb{R}^m##, i.e. from something with a bigger dimension to something with a lower dimension. So some nonzero vectors have to end up as the zero vector. But then it is not invertible. But if ##A^\tau## isn't, then ##A^\tau MA## isn't either, since you cannot recover a nonzero vector from a zero vector.

Maybe it would help us if you show the original problem. ##A^\tau MA## is never invertible if ##n\neq m##.

I attach a picture of one such A matrix. The result IS invertible (for when the middle matrix is 7 by 7 diagonal)

(I must be off line for about 2 hours in case I am still not clear.)
 

Attachments

  • #8
13,216
10,111
You are right, I made a mistake. We have
$$
\mathbb{R}^2\stackrel{A}{\longrightarrow}\mathbb{R}^5\stackrel{M}{\longrightarrow}\mathbb{R}^5\stackrel{A^\tau}{\longrightarrow}\mathbb{R}^2
$$
So if ##A## is injective and the restriction ##\left.A^\tau\right|_{\operatorname{im}(MA)}## is injective, too, then we can invert the combined function. My mistake was to concentrate on the five dimensions in the middle. But if we ignore this fact and only regard the two dimensions left and right, then we can invert the combined function if those conditions hold. They hold in your example though. Sorry.

It won't work with ##m>n##.
 
  • #9
136
12
You are right, I made a mistake. We have
$$
\mathbb{R}^2\stackrel{A}{\longrightarrow}\mathbb{R}^5\stackrel{M}{\longrightarrow}\mathbb{R}^5\stackrel{A^\tau}{\longrightarrow}\mathbb{R}^2
$$
So if ##A## is injective and the restriction ##\left.A^\tau\right|_{\operatorname{im}(MA)}## is injective, too, then we can invert the combined function. My mistake was to concentrate on the five dimensions in the middle. But if we ignore this fact and only regard the two dimensions left and right, then we can invert the combined function if those conditions hold. They hold in your example though. Sorry.

It won't work with ##m>n##.

Thank you!

One last thing.

I USE these results,but my math is deficient.

With that in mind, can you say it in a complete sentence so that I can bolster my argument?

I took the results and use them.

I only encounter problems with, say gyroscopes and the gimbal lock. I can handle all else.

However, short of copy pasting your math, I cannot say it in a simple langauge.

Can you do that for me?
 
  • #10
136
12
You are right, I made a mistake. We have
$$
\mathbb{R}^2\stackrel{A}{\longrightarrow}\mathbb{R}^5\stackrel{M}{\longrightarrow}\mathbb{R}^5\stackrel{A^\tau}{\longrightarrow}\mathbb{R}^2
$$
So if ##A## is injective and the restriction ##\left.A^\tau\right|_{\operatorname{im}(MA)}## is injective, too, then we can invert the combined function. My mistake was to concentrate on the five dimensions in the middle. But if we ignore this fact and only regard the two dimensions left and right, then we can invert the combined function if those conditions hold. They hold in your example though. Sorry.

It won't work with ##m>n##.
I am even content with your saying...

After choosing a normalize system of measurements, the mass matrix itself could be numerically the identity, so taht we can get that out of the way and just discuss

A-transpose times A
 
  • #11
13,216
10,111
Thank you!

One last thing.

I USE these results,but my math is deficient.

With that in mind, can you say it in a complete sentence so that I can bolster my argument?

I took the results and use them.

I only encounter problems with, say gyroscopes and the gimbal lock. I can handle all else.

However, short of copy pasting your math, I cannot say it in a simple langauge.

Can you do that for me?
I will try. But you obviously caught me on a bad day. Let's see. (It will take a while to type and check.)

Edit: Couldn't you simply multiply ##A^\tau MA##? Otherwise we have to check whether the restriction of ##A^\tau## to the image of ##MA## is injective.
 
Last edited:
  • #12
13,216
10,111
Let's abbreviate ##a:=\frac{D}{2}## and ##b=\frac{L}{2}## (easier to type).
\begin{align*}
A^\tau MA&= \begin{bmatrix}
1&-a\cos\theta+b\sin\theta&-a\sin\theta-b\cos\theta&0&-\sin\varphi&0&\cos\varphi\\
0&b\sin\varphi\cos\theta &b\sin\varphi\sin\theta&b\cos\varphi&0&1&0
\end{bmatrix} \cdot \\[10pt]
&\cdot \begin{bmatrix}
m_1&0&0&0&0&0&0\\0&m_2&0&0&0&0&0\\0&0&m_3&0&0&0&0\\0&0&0&m_4&0&0&0\\0&0&0&0&m_5&0&0\\0&0&0&0&0&m_6&0\\0&0&0&0&0&0&m_7\end{bmatrix} \cdot \begin{bmatrix}
1 &0\\ -a\cos\theta+b\sin\theta & b\sin \varphi\cos\theta \\ -a\sin\theta-b\cos\theta & b\sin\varphi\sin\theta \\ 0 &b\cos\varphi \\ -\sin\varphi & 0\\ 0 & 1\\ \cos\varphi &0\\
\end{bmatrix} \\[10pt]
&= \begin{bmatrix}
1&-a\cos\theta+b\sin\theta&-a\sin\theta-b\cos\theta&0&-\sin\varphi&0&\cos\varphi\\
0&b\sin\varphi\cos\theta &b\sin\varphi\sin\theta&b\cos\varphi&0&1&0
\end{bmatrix}\cdot \\[10pt]
&\cdot \begin{bmatrix}
m_1 &0\\ -am_2\cos\theta+bm_2\sin\theta & bm_2\sin \varphi\cos\theta \\ -am_3\sin\theta-bm_3\cos\theta & bm_3\sin\varphi\sin\theta \\ 0 &bm_4\cos\varphi \\ -m_5\sin\varphi & 0\\ 0 & m_6\\ m_7\cos\varphi &0\\
\end{bmatrix}
\end{align*}
Before the matrix gets too large, let us calculate the single entries.

Position ##(1,1):##
##p_{11}=m_1+m_2(-a\cos\theta+b\sin\theta)^2+m_3(-a\sin\theta-b\cos\theta)^2+m_4\sin^2\varphi +m_7\cos^2\varphi ##

Position ##(1,2):##
##p_{12}=(-a\cos\theta+b\sin\theta)(bm_2\sin \varphi\cos\theta)+(-a\sin\theta-b\cos\theta)(bm_3\sin\varphi\sin\theta)##

Position ##(2,1)##:
##p_{21}= (b\sin\varphi\cos\theta)(-am_2\cos\theta+bm_2\sin\theta)+(b\sin\varphi\sin\theta)(-am_3\sin\theta-bm_3\cos\theta) ##

Position ##(2,2)##:
##p_{22}= m_2(b\sin\varphi\cos\theta)^2 +m_3(b\sin\varphi\sin\theta)^2+bm_4\cos^2\varphi +m_6##

Unfortunately there is little we can do from here on as long as ##a\neq b## and the diagonal entries ##m_i## of ##M## are all different. This means you will have to calculate those monster terms and examine the question:

Under which conditions is ##p_{11}\cdot p_{22} - p_{21}\cdot p_{12} \neq 0\;##? These will be the cases where ##A^\tau MA## is invertible. If the ##m_i## were all equal or ##a=b##, then we would get a lot of terms ##c\cdot(\cos^2\psi +\sin^2\psi )=c## and things would become easier, but without this knowledge, the monster has to be analyzed.

Maybe someone else has another idea. But to calculate the image of ##MA## and see whether ##\operatorname{ker} \left.A^\tau\right|_{\operatorname{im}(MA)}=\{0\}## doesn't seem to be easier.
 

Related Threads on Inverting a matrix

  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
10
Views
2K
  • Last Post
Replies
5
Views
1K
  • Last Post
Replies
2
Views
4K
  • Last Post
Replies
10
Views
2K
  • Last Post
Replies
6
Views
639
  • Last Post
Replies
10
Views
14K
  • Last Post
Replies
7
Views
8K
Top