BaseHalf
All posts

The same entrywise sum can be a trade, or a market that clears

Still in that folder, I kept reading §1.2, grew a note from the market-clearing example, and used only addition and stacking to judge the parts of Exercise 1.2 I could already reach.

The first half of §1.2 was already in the folder. vmls-note-3.md still pointed at the definition of addition on printed page 11, and 03-addition.md still had the size rule, the four properties I had checked, and the first displacement examples. I opened the same Desktop folder in BaseHalf 0.6.1 and kept reading from printed page 13.

This is part 4 of the close reading of Boyd and Vandenberghe's Introduction to Applied Linear Algebra. I did not start a new canvas, and I did not treat these later examples as a new definition of the sum.

A second note, grown from market clearing

Printed page 13 is mostly the displacement figures that finish the first examples. In Card Detail I went on to viewer page 24, printed page 14, selected the market-clearing passage, and chose Grow branch again, from the reader, not from the cover. The new file was vmls-note-4.md. It already listed vmls.pdf as upstream and pointed at page 24.

The selected lines stop at a line break, so they end with "In this cas" rather than the next words in the book. I wrote that cut into the note, and I did not pretend the fragment was the whole sentence. The claim I needed was already there: if q_i is agent i's list of quantities produced (positive) or consumed (negative), the sum s = q_1 + ··· + q_N is the net surplus or shortfall of each resource, and s = 0 means the market is closed. That is the same entrywise sum I already had, now with a meaning.

I checked it on a tiny pair of 2-vectors of my own. If q_1 = (2, −1) and q_2 = (−2, 1), then s = (0, 0). Each good that one agent produces is exactly what the other consumes, so this two-agent market clears. If I change the second vector to (−1, 1), then s = (1, 0): there is a surplus of the first good, and the market does not clear.

Audio, features, time series, and a trade list

I wrote the rest of the tour into 04-addition-examples.md, with the book, the new Grow branch note, and the earlier addition notes as upstream. Two audio signals of the same length, added, are heard together. Two feature lists, subtracted, record how two objects differ, including a zero in a slot where the feature matches. Two time series of the same quantity, such as daily profit at two stores, add to a total series. The book points to a monthly rainfall figure for that idea, which I saw at the section break on the next printed page, without starting §1.3.

A portfolio s plus a trade list b, with buys as positive entries and sells as negative, is the portfolio after the trade. I checked that one too: if s = (10, 0, 5) and b = (−3, 2, 0), then s + b = (7, 2, 5).

The section ends with a warning I needed for the next exercises. Some computer languages let you add a number to every entry of a vector, or use + to paste two arrays end to end, as in writing (1, 2) + (3, 4, 5) for (1, 2, 3, 4, 5). The book does not use either of those meanings. Stacking, which I already had from §1.1, is written with parentheses, not with +.

Exercise 1.2, only the parts I can already judge

The attempts are in 04-exercises.md. The statement stays in the book, on printed page 25. a and b are 10-vectors, and c is a 20-vector. I judged only the parts that use stacking, slicing, addition, and subtraction. Parts that need scalar-vector multiplication, which I have not read yet, I left for later.

In (a), a + b − c_{3:12} is legitimate. The slice c_{3:12} runs from index 3 through 12, so it has 10 entries, the same size as a and b. The result is a 10-vector.

In (b), (a, b, c_{3:13}) is stacking, not addition. The slice c_{3:13} has 11 entries, so the stacked vector has length 10 + 10 + 11 = 31.

In (d), (a, 1) + (c_1, b) does not make sense. (a, 1) stacks the 10-vector a with the number 1, so it has length 11. (c_1, b) stacks the first entry of c, a number, with the 20-vector b, so it has length 21. Those sizes are different, so they cannot be added.

In (e), ((a, b), a) is stacking only. (a, b) has length 20, and stacking that with a gives length 30.

I did not use + as concatenation. I am not judging (c), (f), or (g) yet, because each of those uses a scalar multiple such as 2a or 4c, which starts in §1.3.

I checked those readings against the size rule in vmls-note-3.md, the slicing and stacking notes in 01-notation.md, and the last paragraph of §1.2, not against a solution key. I did not ask an agent to grade them in this session.

The same study folder after the rest of §1.2: the book, the notes from parts 1 to 3, the new market-clearing Grow branch note, and the example and exercise notes, with connections already in the files.

What stays for the next section

vmls-note-4.md, 04-addition-examples.md, and 04-exercises.md now sit in the same folder as the definition of addition and Exercise 1.6. §1.2 is finished only in the sense that I have read the section and tried the representative exercises I could already reach. Scalar-vector multiplication is still next, and that is where the remaining parts of Exercise 1.2 belong.

This is part 4 of Learning applied linear algebra with BaseHalf, a close reading of Introduction to Applied Linear Algebra. Previous: Adding two vectors means adding the matching entries.