0 前言
线性代数中涉及到的一个非常重要的内容是二次型,而二次型中涉及到的一个非常重要的内容是二次型化标准型。也许很多人对二次型化标准型非常熟悉,但是如果问到二次型化标准型有什么用,可能挺多人会愣一愣。这篇文章给大家带来的就是二次型的一个应用——最值求解。
1 二次型化标准型
下面先简单回顾下二次型、标准型、二次型化标准型
1.1 二次型
二次型是指含有 n 个变量 \(x_1,x_2,\cdots,x_n\) 的二次齐次多项式,即在一个多项式中,未知数的个数为任意多个,但每一项的次数都为 2。它可以表示为如下形式:
\(f(x_1,x_2,\cdots,x_n) = a_{11}{x_1}^2 + a_{22}{x_2}^2 + \cdots + a_{nn}{x_n}^2 + a_{12}x_1x_2 + a_{13}x_1x_3 + \cdots + a_{n-1,n}x_{n-1}x_n\\\)或者更一般地表示为矩阵形式:
\(f(x) = x^TAx\\\)其中,\(x = {(x_1,x_2, \cdots,x_n)}^T\) 是变量向量,\(A = {(a_{ij})}_{n \times n}\) 是二次型矩阵,且由于二次型中的系数满足 \(a_{ij} = a_{ji}\),所以A是实对称矩阵。
1.2 标准型
标准型是二次型的一种特殊形式,它只含有平方项,即形如:
\(f(x_1,x_2,\cdots,x_n) = \lambda_1y_1^2 + \lambda_2y_2^2 + \cdots + \lambda_ny_n^2\\\)其中,\(\lambda_i (i =1,2,\cdots,n)\) 是常数,且 \(y_1,y_2,\cdots,y_n\) 是原变量 \(x_1,x_2, \cdots,x_n\) 的线性变换。在标准型中,每一项都是某个变量的平方,没有交叉项。
1.3 二次型化标准型
二次型化标准型是指通过适当的坐标变换(如正交变换或可逆线性变换),将一般的二次型转化为标准型的过程。这个过程在理论和实际应用中都具有重要意义。
具体步骤通常包括:
- 求二次型矩阵 \(A\) 的特征值和特征向量:由于 \(A\) 是实对称矩阵,它一定可以相似对角化,即存在正交矩阵 \(Q\),使得 \(Q^TAQ = \Lambda\),其中 \(\Lambda\) 是对角矩阵,对角线上的元素是 \(A\) 的特征值。
- 进行坐标变换:令 \(y = Q^Tx\),则原二次型可以表示为:
\(\\f(x) = x^TAx = (Qy)^TA(Qy) = y^T(Q^TAQ)y = y^T\Lambda y = \lambda_1y_1^2 + \lambda_2y_2^2 + \cdots + \lambda_ny_n^2\)
这样就将原二次型化为了标准型。
2 极值求解
下面来看看二次型化标准型如何帮助我们计算最值。
假设现在有这样一个二次型
\(f(x) = x^TAx\\\)其中,\(x = {(x_1,x_2, \cdots,x_n)}^T\) 是变量向量,\(A = {(a_{ij})}_{n \times n}\) 是二次型矩阵。
2.1 化二次型
由于 \(A\) 是实对称矩阵,它一定可以相似对角化,即存在正交矩阵 \(Q\),使得 \(Q^TAQ = \Lambda\)。我们令 \(y = Q^Tx\),则有
\(\\f(x) = x^TAx = (Qy)^TA(Qy) = y^T(Q^TAQ)y = y^T\Lambda y = \lambda_1y_1^2 + \lambda_2y_2^2 + \cdots + \lambda_ny_n^2\)
2.2 观察总结
化完二次型后,接下来求最值就简单很多了。我们仔细看下面这个式子
\(f(x) = \lambda_1y_1^2 + \lambda_2y_2^2 + \cdots + \lambda_ny_n^2\)如果我们想要求这个式子的最值,\(\lambda_i(i=1,2,\cdots,n)\) 的取值是非常重要的。
2.2.1 特殊情况
我们先来从几种特殊情况入手。
第一种情况,如果对于所有的 \(i = 1,2,\cdots,n\),都有 \(\lambda_i\) 大于 0,那么,无论 \(y_i (i=1,2,\cdots,n)\) 如何取值,都有 \(f(x) \ge 0\),特别地,当对于所有的 \(i = 1,2,\cdots,n\),\(y_i = 0\),那么此时取得最小值 \(f(x) = 0\)。
第二种情况,如果对于所有的 \(i = 1,2,\cdots,n\),都有 \(\lambda_i\)小于 0,那么,无论 \(y_i (i=1,2,\cdots,n)\) 如何取值,都有 \(f(x) \le 0\),特别地,当对于所有的 \(i = 1,2,\cdots,n\),\(y_i = 0\),那么此时取得最大值 \(f(x) = 0\)。
第三种情况,如果对于所有的 \(i = 1,2,\cdots,n\),都有 \(\lambda_i\)等于 0,那么,无论 \(y_i (i=1,2,\cdots,n)\) 如何取值,都有 \(f(x) = 0\)。
好的,我们已经清楚了 \(\lambda_i(i=1,2,\cdots,n)\) 全为正、或全为负、或全为零的情况。
2.2.2 普通情况
现在我们来思考一种相对普通情况,假设 \(\lambda_i(i=1,2,\cdots,n)\) 中,既有正,又有负。
首先我想说,这种情况,没有极大值也没有极小值。我们可以从两个关键点来思考:
- 当 \(\lambda_i\)大于 0,项 \(\lambda_iy_i^2\) 随着 \(y_i\) 的增大而增大,这意味着在这个方向上,函数值可以变得无限大。
- 当 \(\lambda_i\)小于 0,项 \(\lambda_iy_i^2\) 随着 \(y_i\) 的增大而减小,这意味着在这个方向上,函数值可以变得无限小。
这意味着不存在最大值和最小值,因为你可以总是找到更大的 y 值使得函数值超越任何给定的界限。
写到这里,我想我们都能至少有些模糊的感受,特征值 \(\lambda_i\) 的正负性非常重要,我们可以发现:
当有 \(\lambda_i\)大于 0时,\(f(x)\) 可以无限大,没有最大值。当 \(\lambda_i\)小于 0 时,\(f(x)\) 可以无限小,没有最小值。
2.3 结论
以上过程,我想表达的是一个思考的过程,从特殊情况到相对普通情况的一个探索,至此,我们对于特征值 \(\lambda_i\) 建立了一些直观感受。下面我们来整理结论(我不会再进行推导,我相信你们思考出来)。给一个标准型,我们可以快速判断其最大值和最小值情况。
对于最大值:
\begin{cases}
无最大值 & \exists \lambda_i > 0 \\
最大值为 0,无论所有 y_i 如何取值 & \forall \lambda_i = 0 \\
最大值为 0,要求\lambda_i < 0 对应的 y_i 取 0,其他 y_i 任取 & 其他\ (\forall \lambda_i\le 0, \exists \lambda_i < 0)
\end{cases}
对于最小值:
\begin{cases}
无最小值 & \exists \lambda_i < 0 \\
最小值为 0,无论所有 y_i 如何取值 & \forall \lambda_i = 0 \\
最小值为 0,要求\lambda_i > 0 对应的 y_i 取 0,其他 y_i 任取 & 其他\ (\forall \lambda_i\ge 0, \exists \lambda_i > 0)
\end{cases}
上面的核心是要注意什么时候应该让 \(y_i\) 取 0,这是我们要思考和留意的点。
好了,到这里,我们已经知道标准型什么时候有最值,以及取得最值时 \(y\) 的取值。
进而,由于 \(y = Q^Tx\),且 \(Q\) 是正交矩阵(可逆),因此,对于任意的 \(y\) 都有唯一对应的 \(x\),于是我们便可以求出取得最值时 \(x\) 的取值。
以上,即为二次型化标准型对于求最值的帮助,学而有益,希望对大家有启发。
文章评论
ivermectin tablets UK online pharmacy <a href=https://meditrustuk.shop/#>MediTrust</a> generic stromectol UK delivery
I know this if off topic but I'm looking into starting my own weblog and was
curious what all is required to get set up? I'm assuming
having a blog like yours would cost a pretty penny?
I'm not very internet savvy so I'm not 100% certain. Any tips or advice would be greatly appreciated.
Cheers
Yes! Finally something about site.
Remarkable! Its genuinely awesome paragraph, I have got much clear idea concerning from this post.
Because the admin of this site is working, no doubt very rapidly it will be famous, due to its quality contents.
Hey! I'm at work surfing around your blog from my new iphone!
Just wanted to say I love reading your blog and look forward to all your posts!
Carry on the great work!
Everyone loves it when folks get together and share opinions.
Great website, continue the good work!
I was excited to uncover this page. I wanted to thank you for ones time
for this particularly fantastic read!! I definitely appreciated every part of it and
i also have you saved as a favorite to look at new information on your site.
Way cool! Some very valid points! I appreciate you writing this write-up plus the rest of the
site is really good.
Good day! This is kind of off topic but I need some
guidance from an established blog. Is it tough to set up your own blog?
I'm not very techincal but I can figure things out pretty fast.
I'm thinking about making my own but I'm not sure where to start.
Do you have any points or suggestions? Many thanks
Mainjudionline123.com abre las puertas a una bitácora ecuatoriana
auténtica, donde se narran aventuras, memorias de ciudades y secretos locales.
Una ventana al Ecuador profundo, lleno de historia,
gente cálida y naturaleza infinita.
It's a pity you don't have a donate button! I'd without a doubt donate to
this outstanding blog! I suppose for now i'll settle for book-marking and
adding your RSS feed to my Google account. I look
forward to new updates and will talk about this website
with my Facebook group. Talk soon!
hello!,I like your writing very so much! share we keep in touch extra approximately your post on AOL?
I need an expert on this area to resolve my problem.
May be that is you! Taking a look forward to peer you.
Fantastic site. Plenty of helpful information here.
I'm sending it to some pals ans also sharing in delicious.
And obviously, thanks for your effort!
Hello, I enjoy reading all of your article. I wanted to write a little comment to
support you.
Hi, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam responses?
If so how do you prevent it, any plugin or anything you can suggest?
I get so much lately it's driving me mad so any help is very much appreciated.
Helpful info. Lucky me I discovered your web site
by accident, and I'm stunned why this accident did not came
about in advance! I bookmarked it.
Thanks very nice blog!
It's impressive that you are getting ideas from this piece
of writing as well as from our dialogue made here.
Woah! I'm really digging the template/theme of this website.
It's simple, yet effective. A lot of times it's hard
to get that "perfect balance" between user friendliness
and visual appeal. I must say you have done a excellent job with
this. Also, the blog loads super fast for me on Internet explorer.
Excellent Blog!
Excellent website you have here but I was wondering if you knew of any forums that cover the same topics discussed
in this article? I'd really love to be a part of online community where I can get responses
from other experienced individuals that share
the same interest. If you have any suggestions, please let me know.
Cheers!
Why viewers still make use of to read news papers when in this technological world
all is presented on net?
I constantly spent my half an hour to read this web site's
articles or reviews every day along with a mug of coffee.
Hi there to all, how is everything, I think every one is getting more from this web site, and your
views are good designed for new users.
Hi there, I found your blog by way of Google
while looking for a comparable topic, your web site came
up, it appears to be like great. I have bookmarked it in my google bookmarks.
Hi there, simply become aware of your blog thru Google, and found that
it's really informative. I am gonna be careful for brussels.
I'll be grateful in the event you proceed this in future.
Many people will probably be benefited out of your writing.
Cheers!
You made some really good points there. I checked on the internet
for more information about the issue and found most individuals will
go along with your views on this web site.
I do not even know how I finished up right here, but I assumed this post was once good.
I don't realize who you might be however certainly you're going to
a famous blogger when you aren't already. Cheers!
Hi, I would like to subscribe for this blog to obtain most recent updates, thus where can i do it please
help out.
Hello there! I just want to offer you a huge thumbs up
for your great information you've got right here on this
post. I'll be coming back to your web site for more soon.
Hi to every one, the contents present at this website are truly awesome for people
knowledge, well, keep up the good work fellows.
I think what you posted was very logical.
But, what about this? suppose you added a little content?
I mean, I don't wish to tell you how to run your website, but suppose you added something that grabbed folk's attention? I mean 二次型化标准型的应用:最值求解 - 陈银波的知识小站 is kinda vanilla.
You should glance at Yahoo's front page and note how they write post
headlines to grab people to click. You might add a video or a related pic or two
to grab readers excited about what you've got to say.
In my opinion, it might bring your posts a little livelier.
Valuable information. Lucky me I discovered your site unintentionally, and I
am shocked why this twist of fate did not took place earlier!
I bookmarked it.
Hello just wanted to give you a quick heads up. The words
in your article seem to be running off the screen in Safari.
I'm not sure if this is a format issue or something to do with
internet browser compatibility but I thought I'd post to let you know.
The design look great though! Hope you get the issue fixed soon.
Thanks
It's the best time to make a few plans for the future and it's time to
be happy. I've read this submit and if I could I want to suggest you
few interesting things or advice. Maybe you could write subsequent articles
referring to this article. I wish to learn even more issues approximately
it!
My brother suggested I would possibly like this website.
He was once totally right. This post truly made my day. You cann't consider just how a lot
time I had spent for this info! Thanks!
Keep on working, great job!
Hi there, I check your blogs on a regular basis. Your story-telling
style is awesome, keep up the good work!
You are a very capable person!