ArticleslgStudy

science

Linear code

Linear code is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Linear code rather than just read about it. In short: In coding theory, a linear code is an error-correcting code for which any linear combination of codewords is also a codeword. Linear codes are traditionally partitioned into block codes and convolutional codes, although turbo codes can be seen as a hybrid of these two types.

Key takeaways

  • Linear code belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Linear code to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Linear code from memory before moving on to harder problems.

Reference excerpt

In coding theory, a linear code is an error-correcting code for which any linear combination of codewords is also a codeword. Linear codes are traditionally partitioned into block codes and convolutional codes, although turbo codes can be seen as a hybrid of these two types. Linear codes allow for more efficient encoding and decoding algorithms than other codes (cf. syndrome decoding). Linear codes are used in forward error correction and are applied in methods for transmitting symbols (e.g., bits) on a communications channel so that, if errors occur in the communication, some errors can be corrected or detected by the recipient of a message block. The codewords in a linear block code are blocks of symbols that are encoded using more symbols than the original value to be sent. A linear code of length n transmits blocks containing n symbols. For example, the [7,4,3] Hamming code is a linear binary code which represents 4-bit messages using 7-bit codewords. Two distinct codewords differ in at least three bits. As a consequence, up to two errors per codeword can be detected while a single error can be corrected. This code contains 24 = 16 codewords.

Definition and parameters A linear code of length n and dimension k is a linear subspace C with dimension k of the vector space F q n {\displaystyle \mathbb {F} _{q}^{n}} where F q {\displaystyle \mathbb {F} _{q}} is the finite field with q elements. Such a code is called a q-ary code. If q = 2 or q = 3, the code is described as a binary code, or a ternary code respectively. The vectors in C are called codewords. The size of a code is the number of codewords and equals qk. The weight of a codeword is the number of its elements that are nonzero and the distance between two codewords is the Hamming distance between them, that is, the number of elements in which they differ. The distance d of the linear code is the minimum weight of its nonzero codewords, or equivalently, the minimum distance between distinct codewords. A linear code of length n, dimension k, and distance d is called an [n,k,d] code (or, more precisely, [ n , k , d ] q {\displaystyle [n,k,d]_{q}} code). We want to give F q n {\displaystyle \mathbb {F} _{q}^{n}} the standard basis because each coordinate represents a "bit" that is transmitted across a "noisy channel" with some small probability of transmission error (a binary symmetric channel). If some other basis is used then this model cannot be used and the Hamming metric does not measure the number of errors in transmission, as we want it to.

Generator and check matrices As a linear subspace of F q n {\displaystyle \mathbb {F} _{q}^{n}} , the entire code C (which may be very large) may be represented as the span of a set of k {\displaystyle k} codewords (known as a basis in linear algebra). These basis codewords are often collated in the rows of a matrix G known as a generating matrix for the code C. When G has the block matrix form G = [ I k ∣ P ] {\displaystyle {\boldsymbol {G}}=[I_{k}\mid P]} , where I k {\displaystyle I_{k}} denotes the k × k {\displaystyle k\times k} identity matrix and P is some k × ( n − k ) {\displaystyle k\times (n-k)} matrix, then we say G is in standard form. A matrix H representing a linear function ϕ : F q n → F q n − k {\displaystyle \phi :\mathbb {F} _{q}^{n}\to \mathbb {F} _{q}^{n-k}} whose kernel is C is called a check matrix of C (or sometimes a parity check matrix). Equivalently, H is a matrix whose null space is C. If C is a code with a generating matrix G in standard form, G = [ I k ∣ P ] {\displaystyle {\boldsymbol {G}}=[I_{k}\mid P]} , then H = [ − P T ∣ I n − k ] {\displaystyle {\boldsymbol {H}}=[-P^{T}\mid I_{n-k}]} is a check matrix for C. The code generated by H is called the dual code of C. It can be verified that G is a k × n {\displaystyle k\times n} matrix, while H is a ( n − k ) × n {\displaystyle (n-k)\times n} matrix. Linearity guarantees that the minimum Hamming distance d between a codeword c0 and any of the other codewords c ≠ c0 is independent of c0. This follows from the property that the difference c − c0 of two codewords in C is also a codeword (i.e., an element of the subspace C), and the property that d(c, c0) = d(c − c0, 0). These properties imply that

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Linear code

Start with the simplest possible case. Write down what Linear code claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Linear code before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Linear code ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Linear code

In research
Linear code appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Linear code in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Linear code is common in secondary-school and first-year university syllabi. It links to neighbouring topics Coding theory, Finite fields, so understanding it makes those chapters shorter.
In everyday life
Look for Linear code outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Linear code in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Linear code means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Linear code out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Linear code in simple terms?

In coding theory, a linear code is an error-correcting code for which any linear combination of codewords is also a codeword. Linear codes are traditionally partitioned into block codes and convolutional codes, although turbo codes can be seen as a hybrid of these two types.

Why does Linear code matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Linear code?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Linear code.

Tags

  • Coding theory
  • Finite fields

Keep exploring