Affine transformations and their inverse

  • Thread starter hkcool
  • Start date
11
0
Let [itex]F_{K}: \hat{K} \to K[/itex] be defined as follows:
[tex]
F_{K}(\hat{x},\hat{y}) = B_{K}\left[\begin{array}{c}
\hat{x}\\
\hat{y}\\
\end{array}\right] + b_{K}
[/tex]

i.e. [itex]F_{K}[/itex] maps from [itex](\hat{x},\hat{y})[/itex] to [itex](x,y)[/itex]. In a more concrete sense, for this example take the following:
[tex]
B_{K} = \left[\begin{array}{cc}
1 & 0\\
1 & 1\\
\end{array}\right], \;\;\;b_{K} = \left[\begin{array}{c}
0\\
0\\
\end{array}\right]
[/tex]

Now suppose we have the function
[tex]
\hat{\phi}(\hat{x},\hat{y}) = 1 - \hat{x} - \hat{y}
[/tex]

and are given that
[tex]
\phi(x,y) = \hat{\phi} \circ F_{K}^{-1}
[/tex]

Computing [itex]F_{K}^{-1}[/itex] is easy:
[tex]
F_{K}^{-1} = B_{K}^{-1}\left(\left[\begin{array}{c}
x\\
y\\
\end{array}\right] - b_{K}\right) = \left[\begin{array}{c}
x\\
y-x\\
\end{array}\right]
[/tex]

so a direct computation of [itex]\phi(x,y)[/itex] gives:
[tex]
\phi(x,y) = 1 - x - (y-x) = 1-y
[/tex]

Consider the point [itex](x,y) = (1/2,0)[/itex]. We have [itex]\phi(1/2,0) = 1[/itex].

However, if we compute via the composition of the inverse, we have [itex]F_{K}^{-1}(1/2,0) = [1/2,-1/2]^{T}[/itex] and [itex]\hat{\phi} \circ F_{K}^{-1}(1/2,1/2) = 1 - 1/2 + 1/2 = 1[/itex].

edit: err, I figured out the error as I was typing this out and corrected it...maybe someone can delete this for me? Or I guess it can be left as an example or something

So what is the reason for this discrepancy and the error in the second way I computed it? This is a subroutine I have to implement in MATLAB and the only way I can do it is by computing the value of [itex]F_{K}^{-1}[/itex] first and then composing it with [itex]\hat{\phi}[/itex], since I can't get an analytical expression for [itex]\phi[/itex] in MATLAB...(I suppose I could but it would be much more tedious than it's worth).

I'm assuming I'm doing something extremely idiotic here, but can't for the life of me figure out what the error is...

If anyone is curious about the context: It's a finite element computation. Some info on the transformations: http://www.math.umn.edu/~sayas002/anIntro2FEM.pdf [Broken] on page 28.
 
Last edited by a moderator:
341
51
Let [itex]F_{K}: \hat{K} \to K[/itex] be defined as follows:
[tex]
F_{K}(\hat{x},\hat{y}) = B_{K}\left[\begin{array}{c}
\hat{x}\\
\hat{y}\\
\end{array}\right] + b_{K}
[/tex]

i.e. [itex]F_{K}[/itex] maps from [itex](\hat{x},\hat{y})[/itex] to [itex](x,y)[/itex]. In a more concrete sense, for this example take the following:
[tex]
B_{K} = \left[\begin{array}{cc}
1 & 0\\
1 & 1\\
\end{array}\right], \;\;\;b_{K} = \left[\begin{array}{c}
0\\
0\\
\end{array}\right]
[/tex]

Now suppose we have the function
[tex]
\hat{\phi}(\hat{x},\hat{y}) = 1 - \hat{x} - \hat{y}
[/tex]

and are given that
[tex]
\phi(x,y) = \hat{\phi} \circ F_{K}^{-1}
[/tex]

Computing [itex]F_{K}^{-1}[/itex] is easy:
[tex]
F_{K}^{-1} = B_{K}^{-1}\left(\left[\begin{array}{c}
x\\
y\\
\end{array}\right] - b_{K}\right) = \left[\begin{array}{c}
x\\
y-x\\
\end{array}\right]
[/tex]

so a direct computation of [itex]\phi(x,y)[/itex] gives:
[tex]
\phi(x,y) = 1 - x - (y-x) = 1-y
[/tex]

Consider the point [itex](x,y) = (1/2,1/2)[/itex]. We have [itex]\phi(1/2,1/2) = 1/2[/itex].

However, if we compute via the composition of the inverse, we have [itex]F_{K}^{-1}(1/2,1/2) = [1/2,0]^{T}[/itex] and [itex]\hat{\phi} \circ F_{K}^{-1}(1/2,1/2) = 1 - 1/2 - 1/2 = 0[/itex].
Isn't it supposed to be

[tex]\hat{\phi}(F_K^{-1}(1/2,1/2) = \hat{\phi}(1/2,0) = 1 - 1/2 - 0 = 1/2[/tex]
 
11
0
Isn't it supposed to be

[tex]\hat{\phi}(F_K^{-1}(1/2,1/2) = \hat{\phi}(1/2,0) = 1 - 1/2 - 0 = 1/2[/tex]
Yup. I've still got an error in my code in the transformation part, so I'm going to take a look at it and re-edit the question :/ sorry for the confusion
 

Related Threads for: Affine transformations and their inverse

Replies
1
Views
2K
Replies
1
Views
619
Replies
2
Views
2K
Replies
5
Views
15K
  • Posted
Replies
5
Views
3K
Replies
7
Views
675
  • Posted
Replies
4
Views
3K
  • Posted
Replies
4
Views
1K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top