OpenLLM-France/wikimedia huggingface dataset:
# LMIs in Control/pages/Discrete Time KYP Lemma without Feedthrough
## The Concept

It is assumed in the Lemma that the state-space representation (A, B, C, D) is minimal. Then Positive Realness (PR) of the transfer function C(SI − A)$^{-1}$B + D is equivalent to the solvability of the set of LMIs given in this page. Consider now the following scalar example, where (A, B, C, D)=(−α, 0, 0, 1), with α > 0. The transfer function is H(s) = 0 that is PR

## The System

Consider a contiuous-time LTI system, ${\mathcal {G}}:{\mathcal {L}}_{2e}\rightarrow {\mathcal {L}}_{2e}$, with minimal state-space relization (A, B, C, 0), where ${\mathcal {A}}\in {\mathcal {R}}^{n\times n},{\mathcal {B}}\in {\mathcal {R}}^{n\times m},$ and ${\mathcal {C}}\in {\mathcal {R}}^{m\times n},$.
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)\\\end{aligned}}$

## The Data

The matrices The matrices $A,B$ and $C$

## LMI : KYP Lemma without Feedthrough

The system ${\mathcal {G}}$ is positive real (PR) under either of the following equivalet necessary and sufficient conditions.
    1. There exists $P\in {\mathcal {S}}^{n},$ where $p>0$ such that
       ${\begin{aligned}PA+A^{T}P\geq 0\\PB=C^{T}\end{aligned}}$
    2. There exists $Q\in {\mathcal {S}}^{n},$ where $Q>0$ such that
       ${\begin{aligned}AQ+QA^{T}\geq 0\\B=QC^{T}\end{aligned}}$
This is a special case of the KYP Lemma for QSR dissipative systems with Q = 0, Q = 0.5 and R = 0.
The system ${\mathcal {G}}$ is strictly positive real (SPR) under either of the following equivalet necessary and sufficient conditions.
    1. There exists $P\in {\mathcal {S}}^{n},$ where $p>0$ such that
       ${\begin{aligned}PA+A^{T}P<0\\PB=C^{T}\end{aligned}}$
    2. There exists $Q\in {\mathcal {S}}^{n},$ where $Q>0$ such that
       ${\begin{aligned}AQ+QA^{T}<0\\B=QC^{T}\end{aligned}}$
This is a special case of the KYP Lemma for QSR dissipative systems with Q = ε1, Q = 0.5 and R = 0. where ε $\in {\mathcal {R}}_{>0}.$

## Conclusion:

If there exist a positive definite $P$ for the the selected Q,S and R matrices then the system ${\mathcal {G}}$ is Positive Real.

## Implementation

Code for implementation of this LMI using MATLAB. https://github.com/VJanand25/LMI

## Related LMIs

KYP Lemma
State Space Stability

## References

1. J. C. Willems, “Dissipative dynamical systems - part I: General theory,” Archive Rational Mechanics and Analysis, vol. 45, no. 5, pp. 321–351, 1972.
2. D. J. Hill and P. J. Moylan, “The stability of nonlinear dissipative systems,” IEEE Transac- tions on Automatic Control, vol. 21, no. 5, pp. 708–711, 1976.
3. LMI Properties and Applications in Systems, Stability, and Control Theory, by Ryan James Caverly1 and James Richard Forbes2
4. Brogliato B., Maschke B., Lozano R., Egeland O. (2007) Kalman-Yakubovich-Popov Lemma. In: Dissipative Systems Analysis and Control. Communications and Control Engineering. Springer, London
# LMIs in Control/pages/Discrete Time H∞ Optimal Full State Feedback Control

Discrete-Time H∞-Optimal Full-State Feedback Control
A discrete time system operates on a discrete time signal input and produces a discrete time signal output. They are used in digital signal processing, such as digital filters for images or sound. The class of discrete time systems that are both linear and time invariant, known as discrete time LTI systems.
A full state feedback controller design for a Discrete Time system, to minimize the H∞ norm of the closed loop system with exogenous input $w_{k}$ and performance output $z_{k}$.

## The System

Discrete-Time LTI System with state space realization $(A_{d},B_{d},C_{d},D_{d})$ ${\begin{aligned}x_{k+1}&=A_{d}x_{k}+B_{d1}w_{k}+B_{d2}u_{k}\\z_{k}&=C_{d1}x_{k}+D_{d12}u_{k}\\y_{k}&=x_{k}\\\end{aligned}}$

## The Data

The matrices: System $(A_{d},B_{d1},B_{d2},C_{d1},D_{d12}),P,F_{d}$.

## The Optimization Problem

The following feasibility problem should be optimized:
$\gamma$ is minimized while obeying the LMI constraints.

## The LMI:

Discrete-Time H∞-Optimal Full-State Feedback Control
The LMI formulation
H∞ norm < $\gamma$
${\begin{aligned}P\in {S^{n_{x}}};&F_{d}\in {R^{n_{u}*n_{x}}};\gamma \in {R_{>0}}\;\\&P>0\\{\begin{bmatrix}P&A_{d}P-B_{d2}F_{d}&B_{d1}&0\\*&P&0&PC_{d1}^{T}-F_{d}^{T}D_{d12}^{T}\\*&*&-\gamma I&D_{d11}^{T}\\*&*&*&-\gamma I\end{bmatrix}}&>0,\\\end{aligned}}$

## Conclusion:

The H∞-optimal full-state feedback gain is recovered by $K_{d}=F_{d}P^{-1}$

## Implementation

A link to CodeOcean or other online implementation of the LMI MATLAB Code

## Related LMIs

- Continuous Time H∞ Optimal Full State Feedback Control

## External Links

A list of references documenting and validating the LMI.
* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
# LMIs in Control/pages/Discrete Time Lyapunov Stability

Discrete-Time Lyapunov Stability
A discrete time system operates on a discrete time signal input and produces a discrete time signal output. They are used in digital signal processing, such as digital filters for images or sound. The class of discrete time systems that are both linear and time invariant, known as discrete time LTI systems.
Stability of DT LTI systems can be determined by solving Lyapunov Inequality.

## The System

Discrete-Time System
    ${\begin{aligned}x(t)_{k+1}&=A_{d}x(t)_{k},&A_{d}\in {\bf {{R^{n*n}}\;}}\\\end{aligned}}$

## The Data

The matrices: System $A_{d},P$.

## The Optimization Problem

The following feasibility problem should be optimized:
Find P obeying the LMI constraints.

## The LMI:

Discrete-Time Bounded Real Lemma
The LMI formulation
       ${\begin{aligned}P\in {\bf {{S^{n}}\;}}\\{\text{Find}}\;&P>0,\\{\begin{bmatrix}A_{d}^{T}PA_{d}-P\end{bmatrix}}&<0\end{aligned}}$

## Conclusion:

If there exists a $P\in {\bf {S^{n}}}$ satisfying the LMI then, $|\lambda _{i}(A_{d})|\leq 1,\forall i=1,2,...,n;$ and the equilibrium point ${\bar {x}}=0$ of the system is Lyapunov stable.

## Implementation

A link to CodeOcean or other online implementation of the LMI MATLAB Code

## Related LMIs

Continuous_Time_Lyapunov_Inequality - Lyapunov_Inequality

## External Links

A list of references documenting and validating the LMI.
* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
# LMIs in Control/pages/Discrete-Time Quadratic Stability
## Discrete-Time Quadratic Stability

Stability is an important property, stability analysis is necessary for control theory. For robust control, this criterion is applicable for the uncertain discrete-time linear system. It is based on the Discrete Time Lyapunov Stability.

## The System

    ${\begin{aligned}x_{k+1}&=A_{d}(\alpha )x_{k}\\Where:\\&A_{d}(\alpha )=A_{d}+\Delta A_{d}(\delta (t))\\&\Delta A_{d}(\delta (t))=\sum _{k=1}^{n}\delta _{k}(t)A_{d;k}\in \mathrm {R} ^{n\times n}\\&\delta (t)=[\delta _{1}(t),...\delta _{n}(t)]-{\text{The set of perturbation parameters}}\\&\delta (t)\in \mathrm {R} \;\;\;A_{d;i}\in \mathrm {R} ^{n\times n}\end{aligned}}$

## The Data

The matrices $A\in R^{n\times n}\;A_{d;i}\in R^{n\times n}$.

## The Optimization Problem

The following feasibility problem should be solved:
    ${\begin{aligned}{\text{Find}}\;&P>0:\\&(A_{d;0}+\Delta A_{d}(\delta (t)))^{T}P(A_{d;0}+\Delta A_{d}(\delta (t)))-P<0{\text{ for all }}\delta \end{aligned}}$
Where $P\in R^{n,n}$.
In case of polytopic uncertainty:
    ${\begin{aligned}{\text{Find}}\;&P>0:\\&(A_{d;0}+A_{d;i})^{T}P(A_{d;0}+A_{d;i})-P<0{\text{ for all }}i=1,...n\end{aligned}}$

## Conclusion:

This LMI allows us to investigate stability for the robust control problem in the case of polytopic uncertainty and gives on the controller for this case

## Implementation:

* - Matlab implementation using the YALMIP framework and Mosek solver

## Related LMIs: =

* - Discrete Time Stabilizability
* Polytopic stability for continuous time case
* Quadratic polytopic stabilization
* Discrete Time Lyapunov Stability

## External Links

A list of references documenting and validating the LMI.
* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes. (3.20.2 page 64)
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

## Return to Main Page:

* Main Page.
# LMIs in Control/pages/Discrete Time H2 Optimal Full State Feedback Control

Discrete-Time H2-Optimal Full-State Feedback Control
A discrete time system operates on a discrete time signal input and produces a discrete time signal output. They are used in digital signal processing, such as digital filters for images or sound. The class of discrete time systems that are both linear and time invariant, known as discrete time LTI systems.
A full state feedback controller design for a Discrete Time system, to minimize the H2 norm of the closed loop system with exogenous input $w_{k}$ and performance output $z_{k}$.

## The System

Discrete-Time LTI System with state space realization $(A_{d},B_{d},C_{d},D_{d})$ ${\begin{aligned}x_{k+1}&=A_{d}x_{k}+B_{d1}w_{k}+B_{d2}u_{k}\\z_{k}&=C_{d1}x_{k}+D_{d12}u_{k}\\y_{k}&=x_{k}\\\end{aligned}}$

## The Data

The matrices: System $(A_{d},B_{d1},B_{d2},C_{d1},D_{d12}),P,Z,F_{d}$.

## The Optimization Problem

The following feasibility problem should be optimized:
$\mu$ is minimized while obeying the LMI constraints.

## The LMI:

Discrete-Time H2-Optimal Full-State Feedback Control
The LMI formulation
H2 norm < $\mu$
${\begin{aligned}P\in {S^{n_{x}}};Z\in {S^{n_{z}}};&F_{d}\in {R^{n_{u}*n_{x}}};\mu \in {R_{>0}}\;\\&P>0\\&Z>0\\{\begin{bmatrix}P&A_{d}P+B_{d2}F_{d}&B_{d1}\\*&P&0\\*&*&I\end{bmatrix}}&>0,\\{\begin{bmatrix}Z&C_{d1}P+D_{d12}F_{d}\\*&P\end{bmatrix}}&>0,\\&trZ<\mu ^{2}\end{aligned}}$

## Conclusion:

The H2-optimal full-state feedback gain is recovered by $K_{d}=F_{d}P^{-1}$

## Implementation

A link to CodeOcean or other online implementation of the LMI MATLAB Code

## Related LMIs

- Continuous Time H2 Optimal Full State Feedback Control

## External Links

A list of references documenting and validating the LMI.
* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
# LMIs in Control/pages/Discrete Time Bounded Real Lemma

Discrete-Time Bounded Real Lemma
A discrete time system operates on a discrete time signal input and produces a discrete time signal output. They are used in digital signal processing, such as digital filters for images or sound. The class of discrete time systems that are both linear and time invariant, known as discrete time LTI systems.
Discrete-Time Bounded Real Lemma or the H∞ norm can be found by solving a LMI.

## The System

Discrete-Time LTI System with state space realization $(A_{d},B_{d},C_{d},D_{d})$ ${\begin{aligned}&A_{d}\in {\bf {{R^{n*n}},}}&B_{d}\in {\bf {{R^{n*m}},}}&C_{d}\in {\bf {{R^{p*n}},}}&D_{d}\in {\bf {{R^{p*m}}\;}}\\\end{aligned}}$

## The Data

The matrices: System $(A_{d},B_{d},C_{d},D_{d}),P$.

## The Optimization Problem

The following feasibility problem should be optimized:
$\gamma$ is minimized while obeying the LMI constraints.

## The LMI:

Discrete-Time Bounded Real Lemma
The LMI formulation
H∞ norm < $\gamma$
${\begin{aligned}P\in {S^{n}};\gamma \in {R_{>0}}\;\\&P>0,\\{\begin{bmatrix}A_{d}^{T}PA_{d}-P&A_{d}^{T}PB_{d}&C_{d}^{T}\\*&B_{d}^{T}PB_{d}-\gamma I&D_{d}^{T}\\*&*&-\gamma I\end{bmatrix}}&<0,\end{aligned}}$

## Conclusion:

The H∞ norm is the minimum value of $\gamma \in {R_{>0}}$that satisfies the LMI condition. If $(A_{d},B_{d},C_{d},D_{d})$ is the minimal realization then the inequalities can be non-strict.

## Implementation

A link to CodeOcean or other online implementation of the LMI MATLAB Code

## Related LMIs

- Continuous time KYP_Lemma_(Bounded_Real_Lemma)

## External Links

A list of references documenting and validating the LMI.
* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
# Oberon/ETH Oberon/InitStrings

Q.: What is the meaning of the line such as Init="b8024fbb1441cd10b8014fb91401cd10268b4d28268b552a" which can be seen along with other configuration strings in the early stage of booting?
A.: Really not so daunting. The string is machine code which is interpreted when the processor is in real mode before switching to protected mode, V86 mode or long mode. This is a simple and direct means to configure the display by setting up registers, writing to the low-memory setup area, and doing BIOS calls.
When the system is installed with Oberon0, an Init string is provided by Config.Mod. Then whenever the system is started, the boot loader allows the user to change the string.
To understand a specific string, apply a disassembler. Then google to understand what is done with the video processor. Specifications for VESA 2.0 and VESA 3.0 are available as PDF files.
Begin with the simple case, Init="b81200cd10". Here are three methods to disassemble the Init string.
1) You can use this web-based disassembler online: https://www.onlinedisassembler.com/odaweb/. For "Arch" choose "i8086" (the processor is in real mode) and paste the hex bytes of the Init string into the window below the platform setting. On the right hand side find the disassembled code.
2) We want a file Init.o containing these bytes. An obvious if not efficient method is to use Edit or ET to put any 5 characters in Init.o. Then Hex.Open Init.o, replace the characters with B8 12 00 CD 10 and Store. Move Init.o to a Linux system. There apply objdump.
3) Kees C. suggests the libdisasm x86dis tool.
Each method can be applied to any of the strings.
Init="b81200cd10" :
| Machine Code | Operation | Operands | Explanation |
| b81200 | mov | $0x12,%ax | Put 12h into register ax |
| cd10 | int | $0x10 | Given the content of ax, the video BIOS interrupt call will set 640 x 480 pixels x 24 colors. |
Init="b8024fbb1441cd10b8014fb91401cd10268b4d28268b552a" :
| Machine Code | Operation | Operands | Explanation |
| b8024f | mov | $0x4f02,%ax | Put 4f02H in register ax. |
| bb1441 | mov | $0x4114,%bx | Put 4114H in register bx. |
| cd10 | int | $0x10 | For these values in ax and bx, the video BIOS will set 800 x 600 pixels x ?? colors. |
| b8014f | mov | $0x4f01,%ax | Put 4f01H in ax. |
| b91401 | mov | $0x114,%cx | Put 114H in cx to indicate 800 x 600 x 16 bit color. |
| cd10 | int | $0x10 | Video mode is queried. and es:di contains the returned information. |
| 268b4d28 | mov | %es:0x28(%di),%cx | rWinBAttrs[8] = 0 or 1 according to window A or B supported. |
| 268b552a | mov | %es:0x2a(%di),%dx | rWinBAttrs[a] = 1 or 0 according to window is writable or not. |

## References

* ↑ Values are listed in https://pdos.csail.mit.edu/6.828/2008/readings/hardware/vgadoc/VGABIOS.TXT.
* ↑ This resolution is used in the Oberon0 installer. A higher resolution may be configured in the installed system.
* ↑ See http://www.techhelpmanual.com/938-int_10h_4f01h___query_supervga_mode_information.html
* ↑ See http://www.techhelpmanual.com/86-supervga_mode_info_block.html
# Oberon/ETH Oberon/License

Refer to the evaluation by Seraphimblade of compatibility of the ETH Oberon license with CC-by-SA.

## ETH Oberon License

Formerly available from ftp://ftp.ethoberon.ethz.ch/ETHOberon/license.txt.
ETH Oberon Copyright (c) 1990-2003, Computer Systems Institute, ETH Zurich All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
o Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
o Neither the name of the ETH Zurich nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ETH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# OpenSCAD User Manual/Trial Reorder
## Overview

* First Steps
* The OpenSCAD User Interface
* The OpenSCAD Language Reference
* Commented Example Projects
* Using an external Editor with OpenSCAD
* Using OpenSCAD in a command line environment
* Building OpenSCAD from Sources
** Building on Linux/UNIX
** Cross-compiling for Windows on Linux or Mac OS X
** Building on Windows (Outdated)
** Building on Windows (New)
** Building on Mac OS X
** Submitting patches
* Frequently Asked Questions
* Libraries
* Command Glossary - Very short name and syntax reference

## The OpenSCAD Language Reference

* The OpenSCAD Language
** General - READ THIS FIRST - comments, values and data types, variables
* 3D
** 3D Primitive Solids - cube, sphere, cylinder & polyhedron
** 3D to 2D Projection - projection
* Using the 2D Subsystem
** 2D Primitives - square, circle, polygon &
** Text - Generate text using installed or user supplied font files.
** 2D to 3D Extrusion - linear_extrude & rotate_extrude
* Transform and combine
** Size & placement - scale, resize, rotate, translate, mirror, multmatrix, offset, color, minkowski & hull
*** Combining transformations
** Combine primitives - . union, difference, intersection & render
* Other Functions and Operators
** Conditional and Iterator Functions - for, if,conditional ? : & assign
** Mathematical Operators
** Mathematical Functions
*** Trigonometric (cos sin tan acos asin atan atan2)
*** Other (abs ceil concat cross exp floor ln len let log lookup max min norm pow rands round sign sqrt)
** String Functions - str, chr
** List Comprehensions
** Other Language Features - Special '$' variables, echo,render, surface, search , version & version_num
* User-Defined Functions and Modules
* Debugging aids - , % # ! *
* External Files
** Include Statement
** import_dxf
** DXF Extrusion
** Other 2D formats
** STL Import and Export
# Linear Algebra/Vector Spaces

The first chapter began by introducing Gauss' method and finished with a fair understanding, keyed on the Linear Combination Lemma, of how it finds the solution set of a linear system. Gauss' method systematically takes linear combinations of the rows. With that insight, we now move to a general study of linear combinations.
We need a setting for this study. At times in the first chapter, we've combined vectors from $\mathbb {R} ^{2}$ , at other times vectors from $\mathbb {R} ^{3}$ , and at other times vectors from even higher-dimensional spaces. Thus, our first impulse might be to work in $\mathbb {R} ^{n}$ , leaving $n$ unspecified. This would have the advantage that any of the results would hold for $\mathbb {R} ^{2}$ and for $\mathbb {R} ^{3}$ and for many other spaces, simultaneously.
But, if having the results apply to many spaces at once is advantageous then sticking only to $\mathbb {R} ^{n}$'s is overly restrictive. We'd like the results to also apply to combinations of row vectors, as in the final section of the first chapter. We've even seen some spaces that are not just a collection of all of the same-sized column vectors or row vectors. For instance, we've seen a solution set of a homogeneous system that is a plane, inside of $\mathbb {R} ^{3}$ . This solution set is a closed system in the sense that a linear combination of these solutions is also a solution. But it is not just a collection of all of the three-tall column vectors; only some of them are in this solution set.
We want the results about linear combinations to apply anywhere that linear combinations are sensible. We shall call any such set a vector space. Our results, instead of being phrased as "Whenever we have a collection in which we can sensibly take linear combinations ...", will be stated as "In any vector space ...".
Such a statement describes at once what happens in many spaces. The step up in abstraction from studying a single space at a time to studying a class of spaces can be hard to make. To understand its advantages, consider this analogy. Imagine that the government made laws one person at a time: "Leslie Jones can't jay walk." That would be a bad idea; statements have the virtue of economy when they apply to many cases at once. Or, suppose that they ruled, "Kim Ke must stop when passing the scene of an accident." Contrast that with, "Any doctor must stop when passing the scene of an accident." More general statements, in some ways, are clearer.
# Linear Algebra/Topic: The Method of Powers/Solutions
## Solutions
### Problem 1

Use ten iterations to estimate the largest eigenvalue of these matrices, starting from the vector with components $1$ and $2$. Compare the answer with the one obtained by solving the characteristic equation.
* ${\begin{pmatrix}1&5\\0&4\end{pmatrix}}$
* ${\begin{pmatrix}3&2\\-1&0\end{pmatrix}}$

### Answer

* The largest eigenvalue is $4$.
* The largest eigenvalue is $2$.

### Problem 2

Redo the prior exercise by iterating until $|{\vec {v}}_{k}|-|{\vec {v}}_{k-1}|$ has absolute value less than $0.01$ At each step, normalize by dividing each vector by its length. How many iterations are required? Are the answers significantly different?

### Problem 3

Use ten iterations to estimate the largest eigenvalue of these matrices, starting from the vector with components $1$, $2$, and $3$. Compare the answer with the one obtained by solving the characteristic equation.
* ${\begin{pmatrix}4&0&1\\-2&1&0\\-2&0&1\end{pmatrix}}$
* ${\begin{pmatrix}-1&2&2\\2&2&2\\-3&-6&-6\end{pmatrix}}$

### Answer

* The largest eigenvalue is $3$.
* The largest eigenvalue is $-3$.

### Problem 4

Redo the prior exercise by iterating until $|{\vec {v}}_{k}|-|{\vec {v}}_{k-1}|$ has absolute value less than $0.01$. At each step, normalize by dividing each vector by its length. How many iterations does it take? Are the answers significantly different?

### Problem 5

What happens if $c_{1}=0$? That is, what happens if the initial vector does not to have any component in the direction of the relevant eigenvector?

### Answer

In theory, this method would produce $\lambda _{2}$. In practice, however, rounding errors in the computation introduce components in the direction of ${\vec {v}}_{1}$, and so the method will still produce $\lambda _{1}$, although it may take somewhat longer than it would have taken with a more fortunate choice of initial vector.

### Problem 6

How can the method of powers be adopted to find the smallest eigenvalue?

### Answer

Instead of using ${\vec {v}}_{k}=T{\vec {v}}_{k-1}$, use $T^{-1}{\vec {v}}_{k}={\vec {v}}_{k-1}$.