Let be the single eigenvalue. By diagonalizability, there is a basis of eigenvectors, and every corresponding eigenvalue is . For any , linearity gives
Thus , a scalar multiple of the identity map.
A counterexample to the conclusion without diagonalizability is
Its characteristic polynomial is , but . The eigenspace for is therefore , of dimension one. There is no basis of eigenvectors in dimension two, so is not diagonalizable.
For the first matrix, the characteristic polynomial is
Thus the real eigenvalues are . Corresponding eigenvectors are , and . They are linearly independent; the determinant of the matrix with these columns is . Therefore
For example, multiplying the first column by gives , four times that column; multiplying the second gives , its negative. These also check the chosen eigenvectors directly.
For the second matrix,
The quadratic factor has negative discriminant , so is the only real eigenvalue. Solving gives , a one-dimensional eigenspace. It cannot provide a basis of , so
The printed word “eigenvalues” must read “eigenvectors”: eigenvalues are real numbers, whereas a basis of consists of vectors. The intended assertion is
This wording error is present in the original scan.[ref]
If for an invertible matrix , write for its columns. The matrix identity says . The columns of an invertible matrix are a basis, hence they give the required basis of eigenvectors.
Conversely, put a basis of real eigenvectors into the columns of , with corresponding eigenvalues . The basis property makes an invertible matrix. The equations give , so . This is precisely diagonalizability over the real numbers.
The halting problem asks, given the encoding of a Turing machine and an input string, whether that machine eventually halts on that input. Its formal language is
Suppose a Turing machine decided this formal language. Construct another Turing machine that, on an input encoding , runs on . If answers that halts on its own encoding, enters an infinite loop. If answers that does not halt, halts. Handling malformed encodings by immediate rejection makes well-defined on arbitrary strings.
Now run on its own encoding. If says that halts, the construction makes loop; if says that does not halt, the construction makes halt. Either answer contradicts the assumed correctness of . Therefore
The contradiction concerns a decider that must give a correct terminating answer for every encoded machine and input. Simulating does detect a halt when one occurs, but cannot in general certify that a running computation will continue forever.
Cancel one unary symbol from each block at each round. Mark the first, middle and last delimiters by , respectively; use for a cancelled symbol in the left block and for one in the right block. These are extra tape symbols of the Turing machine, all distinct from and blank. No numerical counter is needed in the finite control.
Starting on the first zero, replace it by , scan right through the first block of ones to replace the next zero by , then scan right through the second block and replace its terminal zero by . Move left to . If the initial head is on a blank immediately before the first zero, first move right to that zero. The cancellation loop always starts with the head at :
  • Move right past the symbols. If the next symbol is , all right-hand ones have been cancelled; enter the successful cleanup below.
  • Otherwise that symbol is . Replace it by , move left past right-block symbols to , and continue left past any symbols.
  • If the next symbol is , replace it by . Move right past the symbols back to and repeat the loop.
  • If instead the next symbol is , the left block is exhausted while the right block still needed a cancellation. Enter the zero-result cleanup below.
After completed rounds, the invariant is
It holds initially with , and each completed round changes exactly one remaining in each block into the corresponding marker. This proves the cancellation count and preserves the locations of all delimiters.
For successful cleanup, the right block is entirely symbols. From , sweep right, erasing all symbols and finally , then move left across the erased blanks back to the still-present . Erase and continue left, erasing each , until reaching either the last surviving or . Move one cell right and write the new terminal zero there. Move left through the surviving ones to , replace by , and halt. The remaining nonblank tape is exactly
For example, represents and becomes , representing three.
For zero-result cleanup, the head has reached . Sweep right, erasing everything through while retaining ; after erasing , move left across the blanks to . Replace by , write a second zero in the next cell, and halt. Thus if the machine returns . If , successful cleanup also leaves . With this explicit choice of behaviour,
Each sweep seeks a retained delimiter or an end marker a finite distance away. Each completed round removes one right-block ; after at most completed rounds either cleanup or left-block exhaustion occurs. The stated scans, writes and single-cell moves are implementable by finitely many states, so this is an implementation-level Turing machine construction. The output represents zero; a negative integer cannot be represented in the unsigned unary numeral system specified here.
A Turing machine has a finite control, an unbounded tape divided into cells over a finite tape alphabet including a blank symbol, and a head that reads one cell at a time. For a deterministic Turing machine, the current state and scanned symbol determine the replacement symbol, a head move one cell left or right, and the next state. The input occupies finitely many cells initially; all other cells are blank. Distinguished halting states report acceptance or rejection.
A formal language is a decidable language if some Turing machine halts on every input string, accepting exactly the members and rejecting all nonmembers:
Halting on the nonmembers is part of the requirement; a machine that merely runs forever on some nonmembers need not decide the formal language.
Here , so the image of a linear map is the linear span of . These two vectors are linearly independent: if , the and coordinates give and , hence . Consequently the rank of a linear map is two. By the rank-nullity theorem, the nullity is :
More explicitly, the relation gives the kernel of a linear map
A basis provides unique coordinates. Define
The uniqueness of the coordinates makes this a well-defined function. Adding coordinates and multiplying them by a real scalar shows directly that , so it is a linear map. Substituting gives .
Conversely, every linear map with those three values must send to , by preservation of linear combinations. This determines its value on every element of , proving uniqueness. No linear independence of is needed.
The rank-nullity theorem says that for a linear map with finite-dimensional domain of a function ,
Take a basis of the kernel of a linear map and use basis extension to obtain a basis of . We show that is a basis of the image of a linear map.
Every is a linear combination of the extended basis, and its terms vanish under . Therefore is a linear combination of the , proving the required linear span property. For linear independence, suppose . Then , so for some real scalars . The extended basis is linearly independent, forcing every and to be zero. Thus the image of a linear map has dimension , the kernel of a linear map has dimension , and proves the result.
The image of a linear map and kernel of a linear map are
A linear map sends zero to zero, since . Thus both displayed sets contain zero. If and belong to the image of a linear map, then for any real scalars ,
If belong to the kernel of a linear map, then
so . Containing zero and being closed under linear combinations is the vector subspace criterion. Hence the image of a linear map is a vector subspace of , and the kernel of a linear map is a vector subspace of .
Arrange each four-variable Karnaugh map in Gray code order down the rows and across the columns. For the row strings are 0100, 0100, ----, 1110; for they are 0001, 1011, ----, 0001. The maps are drawn alongside the state-transition diagram above.
In the map, group the whole ab=01 column to obtain . Group rows 11,10 with columns 00,01 to obtain . Group those same rows with columns 01,11 to obtain . The unused-state row permits these larger groups. Symmetrically, in the map group column ab=10, rows 01,11 with columns 11,10, and those same rows with columns 10,00 (wrapping around the map). This gives
These expressions drive the D inputs of the two D flip-flops. With , both copy their stored bit. With , they force Lt; with , they force Gt. The equations also specify a harmless extension at unused code 11: equal inputs retain it and unequal inputs recover to a valid comparison state. Correct reset is still required. This extension was chosen using don't-cares; the circuit is not claimed to recover from every invalid state without reset.
Let denote the state after the next active clock edge. In the truth table, an entry is the two-bit next-state code, and – marks a don't-care value for the unused current state 11:
Current
(Eq)
(Lt)
(Gt)
(unused)
For each input column, 01 forces , 10 forces , and the two equal-input columns copy the current code. Thus this compact truth table specifies all twelve valid combinations of state and input, or twenty-four individual next-state bits:
The finite-state machine retains its state on input 00 or 11, moves to Lt on 01, and moves to Gt on 10. Here each input label is the pair ab, not a pair of outputs. The following state-transition diagram shows every valid-state transition; a diagonal input is stronger than all previous comparison history because it arrives at a more significant position.
Figure 1.
Least-significant-first comparator transitions and Karnaugh maps
. Details.
Equivalently the complete transition rule is
The state-transition diagram starts at Eq, representing the comparison of two empty, hence zero-valued, bit strings.
Use two stored bits with symmetric meanings:
Swapping the two numbers interchanges and and fixes equality. Decode the outputs by
Thus only the equality output needs extra logic gates, namely two inversions and an AND gate, or a NOR gate. Code 11 is unused. Initialize both D flip-flops to zero before a new pair of numbers so the starting state is Eq. In normal operation only the three valid codes are reachable.
In a least-significant-first bit-serial comparator, the new pair has higher significance than every pair already processed. Equal new bits preserve the earlier result; unequal new bits decide the new result regardless of earlier bits. Use a left fold starting at equality:
type Bit = Int
data LEG = Lt | Eq | Gt deriving (Eq, Show)

step :: LEG -> (Bit,Bit) -> LEG
step old (a,b)
  | a < b = Lt
  | a > b = Gt
  | otherwise = old

compare :: [Bit] -> [Bit] -> LEG
compare as bs = foldl step Eq (pairs as bs)
  where
    pairs [] [] = []
    pairs (a:as) [] = (a,0) : pairs as []
    pairs [] (b:bs) = (0,b) : pairs [] bs
    pairs (a:as) (b:bs) = (a,b) : pairs as bs
Inputs have the precondition that each Bit is 0 or 1. Equal-length inputs are the physical circuit case; pairs also gives a defined unsigned meaning to unequal lengths by padding the shorter input with high-order zeros. Ordinary zip would silently discard significant unmatched bits.
After pairs the fold accumulator compares and . Equal new bits add the same amount. If , the new difference has magnitude , exceeding the maximum magnitude of the earlier difference. This proves the accumulator invariant and gives
For the four pairs in the source, the states are Lt, Gt, Gt, Lt, so the final result compares correctly.
Choose a circular doubly linked list with a permanent dummy list header. For a concrete Oberon definition take data = INTEGER; the same link operations work with any chosen data data type:
TYPE data = INTEGER;
     pointerToNode = POINTER TO node;
     node = RECORD
       value : data;
       prev, next : pointerToNode
     END;

PROCEDURE NewList() : pointerToNode;
VAR h : pointerToNode;
BEGIN
  NEW(h);
  h.prev := h;
  h.next := h;
  RETURN h
END NewList;

PROCEDURE Insert(v : data; n : pointerToNode);
VAR t, p : pointerToNode;
BEGIN
  p := n.prev;
  NEW(t);
  t.value := v;
  t.prev := p;
  t.next := n;
  p.next := t;
  n.prev := t
END Insert;

PROCEDURE Delete(n : pointerToNode);
VAR p, q : pointerToNode;
BEGIN
  p := n.prev;
  q := n.next;
  p.next := q;
  q.prev := p;
  n.prev := NIL;
  n.next := NIL
END Delete;
The representation invariant is that the live nodes and header form one finite circular chain, with every neighboring next/previous pair mutually consistent. Insert replaces the link by . Delete replaces by . All other links remain unchanged. These arguments also cover insertion into an empty linked list and deletion of its sole data node, where the neighboring positions can refer to the same header.
Insert requires a live node n belonging to this representation and successful allocation. It may be called with n equal to the header, meaning append just before the end. Delete requires a live data node and must never be called on the header, on NIL, or on a node already deleted or belonging to an incompatible representation. The signature alone cannot enforce those preconditions. The detached node is left for garbage collection; external references must no longer treat it as a member of the linked list. Neither update contains a loop. Apart from allocation and memory management, the link work is
A doubly linked list supports backward traversal and removal of a known linked list node in constant time, because that node supplies its own predecessor. In a singly linked list, removing a known node generally requires finding its predecessor by a forward scan unless the caller already supplies it. Inserting before a known node has the same advantage.
The cost is another pointer per node, more link assignments on every update, and a stronger consistency invariant to maintain. Hence
This does not make locating an arbitrary data value faster: a search still takes linear time in the worst case.
A dummy list header makes insertion or deletion at the front resemble insertion or deletion in the middle: there is always a predecessor record to update. In a circular doubly linked list, it also supplies a stable end position, handles the empty case uniformly, and avoids changing an external head pointer every time the first data node changes.
Its disadvantage is the extra record and associated storage and initialization work; traversal must also distinguish the sentinel node from real data. Thus

Pinned article: Introduction to the OurBigBook Project

Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
We have two killer features:
  1. topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculus
    Articles of different users are sorted by upvote within each article page. This feature is a bit like:
    • a Wikipedia where each user can have their own version of each article
    • a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
    This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.
    Figure 1.
    Screenshot of the "Derivative" topic page
    . View it live at: ourbigbook.com/go/topic/derivative
  2. local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:
    This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
    Figure 5. . You can also edit articles on the Web editor without installing anything locally.
    Video 3.
    Edit locally and publish demo
    . Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact