Полигон YMLSYMLS PolygonТашкент · 2026Tashkent · 2026
до попыткиuntil the attempt —
День 10 31 августа, понедельник ЛиналLinear algebra

Матрицы, системы, определительMatrices, systems, and determinants

Одно число отвечает на вопрос «решение единственно?», а когда это число обращается в ноль, дальше работают руки: ранг, Кронекер — Капелли и разбор особых случаевOne number answers “is the solution unique?”; when that number becomes zero, it is time to work by hand: rank, the Rouché–Capelli theorem, and a case-by-case analysis

0% дня закрыто · решено задач 13 из 16

цель дня
RU

К вечеру ты приводишь любую систему к ступенчатому виду и по последней строке называешь исход, считаешь определитель до $4\times4$ и по нему сразу говоришь, единственно ли решение, а увидев в коэффициентах букву, не бросаешь задачу, а делишь её на случаи: корни определителя разбираются по одному руками. Отдельная линия дня — матрица Грама, приём из официальных материалов YMLS. Проверка — пять финальных задач ниже, третья из них под таймером.

EN

By the end of the day, you can reduce any system to row-echelon form and identify the outcome from the last row, calculate determinants through $4\times4$, and tell from a determinant alone whether a solution is unique. When a parameter appears in the coefficients, you will not abandon the problem: split it into cases and handle determinant roots one at a time by hand. The separate thread for today is the Gram matrix, a technique from the official YMLS materials. Check yourself with the five final problems below; the third one is timed.

Самостоятельные задачи

К концу дня нужно уметь решать эти задачи самостоятельно, без подсказок.

Y1002Уровень YMLSПосчитать определитель $4\times4$ элементарными операциями со строками и столбцами вместо четырёх разложенийCalculate a $4\times4$ determinant with elementary row and column operations instead of four expansionsк задаче →Y1003Уровень YMLS✓Узнать в матрице определитель Вандермонда и выдать ответ произведением разностейRecognize a Vandermonde determinant and give the answer as a product of differencesк задаче →Y1004Уровень YMLSРазобрать систему с параметром до конца: найти корни определителя и по каждому отдельно назвать число решений — эта задача идёт мини-тестом дняFully analyze a parameterized system: find the determinant roots and state the number of solutions for each one — this is today’s mini-testк задаче →Y1001Уровень YMLS✓Собрать матрицу Грама из длин и скалярных произведений, приравнять её определитель нулю и выбрать нужный из двух корнейBuild a Gram matrix from lengths and dot products, set its determinant to zero, and choose the correct one of two rootsк задаче →S1001Уровень ШАДЗакодировать конфигурацию городов и трасс нулями и единицами и получить ответ сравнением двух ранговEncode a configuration of cities and roads with zeros and ones and obtain the answer by comparing two ranksк задаче →
Мост · что нужно вспомнить
RU

Вчерашнее скалярное произведение сегодня перестаёт быть числом и становится элементом таблицы. Матрица Грама $G_{ij} = \langle v_i, v_j\rangle$ собирает все попарные произведения набора векторов в один квадрат чисел, и один-единственный определитель этого квадрата отвечает на вопрос, независимы векторы или нет. Всё, что вчера считалось про длины и углы по отдельности, сегодня сворачивается в одно число.

Оттуда же приходит и умножение матрицы на вектор: $i$-я координата результата — это скалярное произведение $i$-й строки на вектор, то есть вчерашняя операция, применённая построчно. Никакого нового действия сегодня не вводится, вводится только новая упаковка.

Шестой день возвращается методикой. Там был тип задач «при каком значении параметра предел существует», и схема была такая: общий случай считается формулой, а значения параметра, при которых выражение обращается в ноль, перебираются отдельно и руками. Сегодня ровно та же схема работает для систем, только в роли «обращается в ноль» выступает определитель. Если шестой день был усвоен, главный сюжет сегодняшнего не будет новым — новым будет только инструмент.

EN

Yesterday’s dot product stops being a number and becomes an entry in a table. The Gram matrix $G_{ij} = \langle v_i, v_j\rangle$ collects all pairwise dot products of a set of vectors in one square array of numbers, and the determinant of that square answers one question: are the vectors independent? Everything that yesterday was calculated separately for lengths and angles is folded into a single number today.

Matrix–vector multiplication comes from the same place: the $i$th coordinate of the result is the dot product of the $i$th row with the vector — yesterday’s operation applied row by row. No new action is introduced today; only a new packaging.

Day 6 returns as a method. There we had problems of the form “for which parameter value does the limit exist?” The pattern was: compute the general case with a formula, then handle separately by hand those parameter values where the expression becomes zero. The same pattern works for systems today, with the determinant playing the role of “becomes zero.” If you absorbed Day 6, the main story today is not new; only the tool is new.

Вспомни вслух, до открытия конспектов:

  1. Система двух линейных уравнений решается сложением и вычитанием уравнений; от прибавления к одному уравнению другого, умноженного на число, множество решений не меняетсяA system of two linear equations is solved by adding and subtracting equations; adding a multiple of one equation to another does not change the solution set
  2. Две прямые на плоскости либо пересекаются в одной точке, либо параллельны, либо совпадают — четвёртого случая нетTwo lines in the plane either intersect at one point, are parallel, or coincide — there is no fourth case
  3. Квадратное уравнение $ax^2 + bx + c = 0$: корни через дискриминант, сумма корней равна $-b/a$, произведение равно $c/a$For the quadratic equation $ax^2 + bx + c = 0$, roots come from the discriminant, their sum is $-b/a$, and their product is $c/a$
  4. Вынесение общего множителя за скобку и разложение многочлена на множители; кратный корень — это множитель в степени выше первойFactor out common terms and factor polynomials; a repeated root is a factor with power greater than one
  5. Две строки чисел пропорциональны, если одна получается из другой умножением на число; нулевая строка пропорциональна любойTwo rows of numbers are proportional if one is obtained from the other by multiplying by a number; a zero row is proportional to every row
  6. Из дня 9: $\langle x, y\rangle = x_1y_1 + \cdots + x_ny_n$, операция симметрична и линейна по каждому аргументу, и $\langle v, v\rangle = \|v\|^2$From Day 9: $\langle x, y\rangle = x_1y_1 + \cdots + x_ny_n$, the operation is symmetric and linear in each argument, and $\langle v, v\rangle = \|v\|^2$
  7. Из дня 9: $\langle u, v\rangle = \|u\|\,\|v\|\cos\varphi$, а неравенство Коши — Буняковского $|\langle u,v\rangle| \le \|u\|\,\|v\|$ обращается в равенство только для коллинеарных векторовFrom Day 9: $\langle u, v\rangle = \|u\|\,\|v\|\cos\varphi$, and Cauchy–Schwarz $|\langle u,v\rangle| \le \|u\|\,\|v\|$ is an equality only for collinear vectors
  8. Из дня 6: при наличии параметра значения, при которых выражение обращается в ноль, перебираются отдельно от общего случая, а не подставляются в общую формулуFrom Day 6: with a parameter, values that make an expression zero are handled separately from the general case, not substituted into the general formula
  9. Площадь параллелограмма со сторонами $p$, $q$ и углом $\varphi$ между ними равна $pq\sin\varphi$; $\sin^2\varphi + \cos^2\varphi = 1$The area of a parallelogram with sides $p$, $q$ and angle $\varphi$ between them is $pq\sin\varphi$; $\sin^2\varphi + \cos^2\varphi = 1$

Повторение прошлых дней

Карточки возвращаются через 1, 2, 4, 7, 14 и 21 день в зависимости от того, насколько уверенно ты их вспомнил; «не помню» отправляет карточку в начало. Это часть разогрева, вместе с блоком «Мост».

Комбинаторика день 1 осталось 89
RU

Правило умножения: две оговорки, без которых оно не работает

EN

The multiplication rule: two qualifications without which it does not work

Сначала сформулируй вслух. Попытка вспомнить закрепляет сильнее, чем чтение готового ответа.

6 задач: подборка покрывает темы и микронавыки последнего учебного дня (9), а для каждой идеи выбирает наиболее сильный доступный уровень. Здесь отдельная попытка: решение в исходном дне не подставляется. Сначала назови тему вслух, затем решай.

Y0904Уровень YMLSЛиналуровень YMLS
RU

Запрос закодирован вектором $q = (2, -1, 3, 0, 1)$, а три документа — векторами $d_1 = (1, 1, 2, -2, 0)$, $d_2 = (3, 0, 1, 1, 2)$ и $d_3 = (4, 0, 1, 2, 2)$. Ближайшим считается тот документ, у которого косинусная близость к запросу — то есть косинус угла между его вектором и $q$ — наибольшая. Найдите эту наибольшую косинусную близость. Ответ округлите до четырёх знаков после запятой.

EN

A query is encoded by the vector $q = (2, -1, 3, 0, 1)$, and three documents are encoded by the vectors $d_1 = (1, 1, 2, -2, 0)$, $d_2 = (3, 0, 1, 1, 2)$, and $d_3 = (4, 0, 1, 2, 2)$. The closest document is the one with the greatest cosine similarity to the query—that is, the greatest cosine of the angle between its vector and $q$. Find this maximum cosine similarity. Round your answer to four decimal places.

Подсказка / Hint
RU

Одна и та же формула, применённая трижды. Сравнивать сами скалярные произведения нельзя: длины у документов разные, и каждое произведение делится на своё число.

EN

Apply the same formula three times. You cannot compare the inner products themselves: the document vectors have different lengths, so each product is divided by a different quantity.

Решение / Solution
RU

Длина запроса считается один раз на все три документа:

$$\|q\| = \sqrt{4 + 1 + 9 + 0 + 1} = \sqrt{15} \approx 3.8730$$

Дальше по одному документу.

$$\langle q, d_1\rangle = 2 - 1 + 6 + 0 + 0 = 7, \qquad \|d_1\| = \sqrt{1 + 1 + 4 + 4 + 0} = \sqrt{10}$$$$\cos\varphi_1 = \frac{7}{\sqrt{15}\cdot\sqrt{10}} = \frac{7}{\sqrt{150}} \approx 0.5715$$$$\langle q, d_2\rangle = 6 + 0 + 3 + 0 + 2 = 11, \qquad \|d_2\| = \sqrt{9 + 0 + 1 + 1 + 4} = \sqrt{15}$$$$\cos\varphi_2 = \frac{11}{\sqrt{15}\cdot\sqrt{15}} = \frac{11}{15} \approx 0.7333$$$$\langle q, d_3\rangle = 8 + 0 + 3 + 0 + 2 = 13, \qquad \|d_3\| = \sqrt{16 + 0 + 1 + 4 + 4} = 5$$$$\cos\varphi_3 = \frac{13}{5\sqrt{15}} \approx 0.6713$$

Корни для сравнения можно и не извлекать: все три косинуса положительны, поэтому больший из них — тот, у кого больше квадрат, а в квадратах корни исчезают и остаются дроби $\frac{49}{150} \approx 0.327$, $\frac{121}{225} \approx 0.538$, $\frac{169}{375} \approx 0.451$.

Наибольшая близость у второго документа: $\frac{11}{15} \approx 0.7333$ — и это единственное из трёх чисел, которое считается точно, без приближений. Все три косинуса лежат в $[-1, 1]$, обязательная проверка пройдена.

Наибольшее произведение — не наибольшая близость

У третьего документа скалярное произведение самое большое из трёх, 13 против 11, а косинусная близость всё равно меньше. Причина в длине: $\|d_3\| = 5$ против $\|d_2\| = \sqrt{15} \approx 3.8730$. Кто сравнит числители и остановится, выберет не тот документ — это и есть ловушка задачи.

Это буквально ML

Ровно так поиск и рекомендательная система выбирают ближайшего кандидата: считают косинус между вектором запроса и вектором каждого документа и берут максимум. Разница только в размерности — там 768 или 1536 вместо 5 — и в количестве кандидатов: их миллионы, поэтому длины $\|d_i\|$ считают заранее и хранят рядом с векторами.

Косинус длину игнорирует намеренно: длинный вектор $d_3$ не получает преимущества за то, что он длинный. Значение около $0.73$ означает «довольно похожи»: для эмбеддингов близкими обычно считают косинус выше $0.8$.

EN

The length of the query needs to be calculated only once for all three documents:

$$\|q\| = \sqrt{4 + 1 + 9 + 0 + 1} = \sqrt{15} \approx 3.8730$$

Now consider each document in turn.

$$\langle q, d_1\rangle = 2 - 1 + 6 + 0 + 0 = 7, \qquad \|d_1\| = \sqrt{1 + 1 + 4 + 4 + 0} = \sqrt{10}$$$$\cos\varphi_1 = \frac{7}{\sqrt{15}\cdot\sqrt{10}} = \frac{7}{\sqrt{150}} \approx 0.5715$$$$\langle q, d_2\rangle = 6 + 0 + 3 + 0 + 2 = 11, \qquad \|d_2\| = \sqrt{9 + 0 + 1 + 1 + 4} = \sqrt{15}$$$$\cos\varphi_2 = \frac{11}{\sqrt{15}\cdot\sqrt{15}} = \frac{11}{15} \approx 0.7333$$$$\langle q, d_3\rangle = 8 + 0 + 3 + 0 + 2 = 13, \qquad \|d_3\| = \sqrt{16 + 0 + 1 + 4 + 4} = 5$$$$\cos\varphi_3 = \frac{13}{5\sqrt{15}} \approx 0.6713$$

There is no need to evaluate the square roots in order to compare the results. All three cosines are positive, so their order is the same as the order of their squares. Squaring removes the roots and gives the fractions $\frac{49}{150} \approx 0.327$, $\frac{121}{225} \approx 0.538$, and $\frac{169}{375} \approx 0.451$.

The second document has the greatest similarity: $\frac{11}{15} \approx 0.7333$. This is the only one of the three values that can be calculated exactly without approximation. All three cosines lie in $[-1, 1]$, as required.

The greatest inner product need not give the greatest similarity

The third document has the largest inner product, 13 rather than 11, yet its cosine similarity is smaller. The reason is its length: $\|d_3\| = 5$, whereas $\|d_2\| = \sqrt{15} \approx 3.8730$. Comparing only the numerators leads to the wrong document; this is the trap in the problem.

This is exactly how machine learning uses cosine similarity

Search and recommendation systems select the nearest candidate in precisely this way: they calculate the cosine between the query vector and each document vector, then take the maximum. The only differences are the dimension—typically 768 or 1536 rather than 5—and the number of candidates, which may be in the millions. For this reason, the lengths $\|d_i\|$ are calculated in advance and stored with the vectors.

Cosine similarity deliberately ignores magnitude: the longer vector $d_3$ receives no advantage merely for being long. A value of about $0.73$ indicates that the vectors are reasonably similar; for embeddings, a cosine above $0.8$ is often considered close.

уверенность1 — угадал, 5 — уверен полностью
Y0903Уровень YMLSЛиналуровень YMLS
RU

Найдите расстояние от точки $(1, 1, 1)$ до прямой, проходящей через начало координат в направлении вектора $v = (2, -1, 2)$. Ответ округлите до четырёх знаков после запятой.

EN

Find the distance from the point $(1, 1, 1)$ to the line through the origin in the direction of the vector $v = (2, -1, 2)$. Round your answer to four decimal places.

Подсказка / Hint
RU

Разложи вектор точки на составляющую вдоль прямой и перпендикулярную ей. Дальше — теорема Пифагора.

EN

Decompose the position vector of the point into a component along the line and a component perpendicular to it. Then apply the Pythagorean theorem.

Решение / Solution
RU

Пусть $p = (1,1,1)$.

Составляющая вдоль прямой — длина проекции:

$$\frac{\langle p, v\rangle}{\|v\|} = \frac{2 - 1 + 2}{3} = 1$$

Полная длина вектора: $\|p\| = \sqrt{3}$.

Эти две составляющие перпендикулярны, значит по теореме Пифагора искомое расстояние:

$$d = \sqrt{\|p\|^2 - \left(\frac{\langle p,v\rangle}{\|v\|}\right)^2} = \sqrt{3 - 1} = \sqrt2 \approx 1.4142$$

Проверка вторым путём. $\proj_v(p) = \frac{3}{9}(2,-1,2) = \left(\frac23, -\frac13, \frac23\right)$, остаток $p_\perp = \left(\frac13, \frac43, \frac13\right)$, его длина $\frac{\sqrt{1 + 16 + 1}}{3} = \frac{\sqrt{18}}{3} = \sqrt2$. Сошлось.

Схема, работающая в любой размерности

Разложи вектор на составляющую вдоль направления и ортогональную ей. Длина первой — проекция, длина второй — искомое расстояние, связь между ними — Пифагор.

В $\mathbb{R}^3$ это ещё можно вообразить. В $\mathbb{R}^{100}$ — уже нет, а формула работает точно так же. В этом и смысл алгебраического подхода.

EN

Let $p = (1,1,1)$.

The component along the line has length

$$\frac{\langle p, v\rangle}{\|v\|} = \frac{2 - 1 + 2}{3} = 1$$

The full vector has length $\|p\| = \sqrt{3}$.

The two components are perpendicular, so the required distance follows from the Pythagorean theorem:

$$d = \sqrt{\|p\|^2 - \left(\frac{\langle p,v\rangle}{\|v\|}\right)^2} = \sqrt{3 - 1} = \sqrt2 \approx 1.4142$$

Check by a second method. We have $\proj_v(p) = \frac{3}{9}(2,-1,2) = \left(\frac23, -\frac13, \frac23\right)$, so the remainder is $p_\perp = \left(\frac13, \frac43, \frac13\right)$. Its length is $\frac{\sqrt{1 + 16 + 1}}{3} = \frac{\sqrt{18}}{3} = \sqrt2$, confirming the result.

A method that works in any dimension

Decompose the vector into a component along the given direction and a component orthogonal to it. The length of the first is the projection; the length of the second is the required distance; and the two are related by the Pythagorean theorem.

In $\mathbb{R}^3$, this can still be visualized. In $\mathbb{R}^{100}$, it cannot, but the formula works in exactly the same way. That is the value of the algebraic approach.

уверенность1 — угадал, 5 — уверен полностью
W0903РазминкаЛиналразминка
RU

Найдите длину вектора $(1, 2, 2, 4)$.

EN

Find the length of the vector $(1, 2, 2, 4)$.

Подсказка / Hint
RU

Длина — это корень из скалярного произведения вектора на самого себя. Четыре координаты формуле не мешают: она не знает, сколько их.

EN

The length is the square root of the inner product of the vector with itself. The fact that there are four coordinates makes no difference: the formula works in any dimension.

Решение / Solution
RU$$\|(1,2,2,4)\| = \sqrt{\langle (1,2,2,4),\ (1,2,2,4)\rangle} = \sqrt{1 + 4 + 4 + 16} = \sqrt{25} = 5$$

Нарисовать четырёхмерный вектор нельзя, а измерить его длину можно: определение длины через скалярное произведение переносится в любую размерность дословно.

Куда это ведёт

Длина стоит в знаменателе всех остальных формул дня — и косинуса угла, и длины проекции. Ошибка в сумме квадратов здесь превращается в ошибку сразу везде, поэтому её проверяют дважды. Целый ответ — не совпадение: числа подобраны так специально.

EN$$\|(1,2,2,4)\| = \sqrt{\langle (1,2,2,4),\ (1,2,2,4)\rangle} = \sqrt{1 + 4 + 4 + 16} = \sqrt{25} = 5$$

Although a four-dimensional vector cannot be drawn, its length can still be measured: the definition of length in terms of the inner product carries over unchanged to any dimension.

Where this leads

Length appears in the denominator of every other formula used today, including the cosine of an angle and the length of a projection. An error in the sum of squares here propagates through every subsequent calculation, so check it twice. The integer answer is no accident: the numbers were chosen deliberately.

уверенность1 — угадал, 5 — уверен полностью
Y0901Уровень YMLSЛиналуровень YMLS
RU

Найдите угол (в радианах) между главной диагональю куба и его ребром, выходящим из той же вершины. Ответ округлите до четырёх знаков после запятой.

EN

Find the angle, in radians, between a space diagonal of a cube and an edge issuing from the same vertex. Round your answer to four decimal places.

Подсказка / Hint
RU

Возьми единичный куб с вершиной в начале координат — тогда и диагональ, и ребро получают простые координаты.

EN

Take a unit cube with the relevant vertex at the origin. The diagonal and the edge will then have simple coordinates.

Решение / Solution
RU

Поместим куб в начало координат. Тогда ребро — это вектор $e = (1, 0, 0)$, а главная диагональ — $d = (1, 1, 1)$.

$$\cos\varphi = \frac{\langle d, e\rangle}{\|d\|\,\|e\|} = \frac{1}{\sqrt3 \cdot 1} \approx 0.5774$$$$\varphi = \arccos\frac{1}{\sqrt3} \approx 0.9553 \text{ рад}$$

В градусах это $\approx 54.74°$ — так называемый «магический угол», встречающийся в кристаллографии и спектроскопии.

Приём, который стоит забрать

Геометрическую задачу решили, введя координаты. Никаких построений и теорем о пространственных фигурах не понадобилось — только два вектора и одна формула. Так стоит поступать почти со всеми задачами про углы и расстояния в пространстве.

EN

Place the relevant vertex of the cube at the origin. The edge is represented by $e = (1, 0, 0)$, and the space diagonal by $d = (1, 1, 1)$.

$$\cos\varphi = \frac{\langle d, e\rangle}{\|d\|\,\|e\|} = \frac{1}{\sqrt3 \cdot 1} \approx 0.5774$$$$\varphi = \arccos\frac{1}{\sqrt3} \approx 0.9553 \text{ radians}$$

In degrees, this is approximately $54.74°$. It is known as the “magic angle” and occurs in crystallography and spectroscopy.

A method worth remembering

We solved a geometry problem by introducing coordinates. No constructions or theorems about three-dimensional figures were needed—only two vectors and one formula. This is an effective approach to nearly any problem involving angles or distances in space.

уверенность1 — угадал, 5 — уверен полностью
Y0902Уровень YMLSЛиналуровень YMLS
RU

Векторы $u$, $v$, $w$ имеют длины 1, 2 и 3 соответственно, а угол между любыми двумя из них равен $60°$. Найдите $\|u + v + w\|$.

EN

Vectors $u$, $v$, and $w$ have lengths 1, 2, and 3, respectively, and the angle between every pair of them is $60°$. Find $\|u + v + w\|$.

Подсказка / Hint
RU

Раскрой квадрат нормы через скалярные произведения. Никакой геометрии не нужно.

EN

Expand the squared norm in terms of inner products. No geometry is required.

Решение / Solution
RU

Скалярные произведения считаем по формуле $\langle a,b\rangle = \|a\|\|b\|\cos 60° = \frac12\|a\|\|b\|$:

$$\langle u,v\rangle = \tfrac12 \cdot 1 \cdot 2 = 1, \quad \langle u,w\rangle = \tfrac12 \cdot 1 \cdot 3 = 1.5, \quad \langle v,w\rangle = \tfrac12 \cdot 2 \cdot 3 = 3$$

Раскрываем квадрат:

$$\|u+v+w\|^2 = \|u\|^2 + \|v\|^2 + \|w\|^2 + 2\left(\langle u,v\rangle + \langle u,w\rangle + \langle v,w\rangle\right)$$$$= 1 + 4 + 9 + 2(1 + 1.5 + 3) = 14 + 11 = 25$$$$\|u + v + w\| = 5$$
Ответ вышел целым

Составители часто подбирают данные так, чтобы ответ был круглым. Если у тебя получилось $4.87$, это повод перепроверить арифметику, а не смириться.

EN

Use $\langle a,b\rangle = \|a\|\|b\|\cos 60° = \frac12\|a\|\|b\|$ to calculate the inner products:

$$\langle u,v\rangle = \tfrac12 \cdot 1 \cdot 2 = 1, \quad \langle u,w\rangle = \tfrac12 \cdot 1 \cdot 3 = 1.5, \quad \langle v,w\rangle = \tfrac12 \cdot 2 \cdot 3 = 3$$

Now expand the square:

$$\|u+v+w\|^2 = \|u\|^2 + \|v\|^2 + \|w\|^2 + 2\left(\langle u,v\rangle + \langle u,w\rangle + \langle v,w\rangle\right)$$$$= 1 + 4 + 9 + 2(1 + 1.5 + 3) = 14 + 11 = 25$$$$\|u + v + w\| = 5$$
The answer is an integer

Problem setters often choose data that produce a neat answer. If you obtain $4.87$, that is a reason to check your arithmetic rather than accept the result.

уверенность1 — угадал, 5 — уверен полностью
S0901Уровень ШАДЛиналЭкзамен ШАД 2024, задача E «Давай поиграем»
RU

Случайный вектор $\Psi$ в $\mathbb{R}^{n}$ имеет стандартное нормальное распределение (нулевое среднее, единичная матрица ковариаций). Два игрока заранее зафиксировали векторы $a$ и $l$.

В раунде $k$ разыгрывается независимая реализация $\psi_k$. Лёша получает одно очко, если

$$\sign\langle\psi_k, a\rangle \cdot \sign\langle\psi_k, l\rangle > 0$$

Артём получает одно очко, если это произведение отрицательно. Очки только начисляются: за проигранный раунд ничего не снимается. Случай нулевого произведения имеет нулевую вероятность и в счёт не идёт.

К чему стремится отношение числа очков Артёма к числу сыгранных раундов при $k \to \infty$? Дайте ответ для $a = (1, 0)$ и $l = (1, 1)$. Ответ округлите до четырёх знаков после запятой.

EN

A random vector $\Psi$ in $\mathbb{R}^{n}$ has a standard normal distribution, with zero mean and the identity covariance matrix. Two players have fixed vectors $a$ and $l$ in advance.

In round $k$, an independent realization $\psi_k$ is drawn. Lyosha receives one point if

$$\sign\langle\psi_k, a\rangle \cdot \sign\langle\psi_k, l\rangle > 0$$

Artyom receives one point if this product is negative. Points are only awarded: no points are deducted for losing a round. The event that the product is zero has probability zero and is not included.

As $k \to \infty$, what does the ratio of Artyom's score to the number of rounds played approach? Give your answer for $a = (1, 0)$ and $l = (1, 1)$. Round your answer to four decimal places.

Подсказка / Hint
RU

Исход раунда зависит только от знаков скалярных произведений, а значит только от угла. Длины векторов роли не играют.

EN

The outcome of a round depends only on the signs of the inner products, and hence only on the angle. The lengths of the vectors do not matter.

Решение / Solution
RU

Шаг 1. Понижение размерности. Пусть $\mathcal{L}$ — плоскость, натянутая на $a$ и $l$. Для любого вектора $\psi$ рассмотрим его ортогональную проекцию $\psi_1$ на $\mathcal{L}$. Разность $\psi - \psi_1$ перпендикулярна плоскости, а значит и обоим векторам:

$$\langle a, \psi\rangle = \langle a, \psi_1\rangle, \qquad \langle l, \psi\rangle = \langle l, \psi_1\rangle$$

Исход раунда зависит только от проекции. Задача из $n$-мерной стала плоской.

Шаг 2. Свойство нормального распределения. Проекция стандартного нормального вектора на плоскость — снова стандартный нормальный вектор, но размерности 2. Его направление распределено равномерно по окружности.

Шаг 3. Геометрическая вероятность. Условие $\langle\psi_1, a\rangle = 0$ задаёт на плоскости прямую, перпендикулярную $a$; условие $\langle\psi_1, l\rangle = 0$ — прямую, перпендикулярную $l$. Угол между этими двумя прямыми равен углу $\phi$ между самими $a$ и $l$. Две прямые режут плоскость на четыре сектора: два углового размера $\phi$, где знаки скалярных произведений расходятся, и два размера $\pi - \phi$, где знаки совпадают. Проверка: $2\phi + 2(\pi-\phi) = 2\pi$. Какая из двух пар шире, зависит от того, острый угол $\phi$ или тупой, и на ответ это не влияет.

Очко Артёму даётся ровно тогда, когда направление попало в сектор размера $\phi$, а направление распределено равномерно, значит

$$\P(\text{очко Артёму}) = \frac{2\phi}{2\pi} = \frac{\phi}{\pi}$$

Это ровно та формула, которая была получена на плоскости в задаче b0904.

Шаг 4. Закон больших чисел. Раунды независимы и одинаково распределены, очки только начисляются, поэтому число очков Артёма — это просто число выигранных им раундов. Отношение к числу раундов есть частота события, и она стремится к его вероятности:

$$\frac{\text{очки Артёма}}{\text{число раундов}} \longrightarrow \frac{\phi}{\pi} = \frac{1}{\pi}\arccos\frac{\langle a,l\rangle}{\|a\|\,\|l\|}$$

Подставляем данные. $\langle a,l\rangle = 1$, $\|a\| = 1$, $\|l\| = \sqrt2$, значит $\cos\phi = \frac{1}{\sqrt2}$ и $\phi = \frac{\pi}{4}$.

$$\frac{\phi}{\pi} = \frac{\pi/4}{\pi} = \frac14 = 0.2500$$
Где здесь теряют ответ

Соблазн посчитать «перевес»: если обозначить долю раундов Лёши через $p = 1 - \phi/\pi$, то разность $p - (1 - p) = 2p - 1$ равна $0.5$ и выглядит красиво. Но это ответ на другой вопрос — так считают, когда за проигранный раунд снимают очко. В нашем условии сказано прямо, что очки только начисляются, поэтому нужна сама доля, а не перевес.

Проверка здравым смыслом: доля обязана лежать в $[0, 1]$ и при $\phi \to 0$ (векторы почти сонаправлены) стремиться к нулю — Артёму почти нечего ловить. Формула $\phi/\pi$ этому отвечает.

Три идеи в одной задаче

Первая: проекция сохраняет скалярные произведения с векторами подпространства — поэтому многомерную задачу можно сплющить до плоской.

Вторая: направление нормального вектора распределено равномерно — здесь смыкаются линейная алгебра и геометрическая вероятность второго дня.

Третья: закон больших чисел превращает «отношение очков к раундам» в вероятность одного раунда.

Ни одна из них по отдельности не сложна, и каждая вполне может прийти на YMLS. Задача уровня ШАД отличается тем, что требует соединить все три.

EN

Step 1. Reduce the dimension. Let $\mathcal{L}$ be the plane spanned by $a$ and $l$. For any vector $\psi$, let $\psi_1$ be its orthogonal projection onto $\mathcal{L}$. The difference $\psi - \psi_1$ is perpendicular to the plane and therefore to both vectors:

$$\langle a, \psi\rangle = \langle a, \psi_1\rangle, \qquad \langle l, \psi\rangle = \langle l, \psi_1\rangle$$

Thus, the outcome of the round depends only on the projection. The $n$-dimensional problem has been reduced to a planar one.

Step 2. Use a property of the normal distribution. The projection of a standard normal vector onto a plane is again a standard normal vector, now in two dimensions. Its direction is uniformly distributed on the circle.

Step 3. Calculate the geometric probability. In the plane, the condition $\langle\psi_1, a\rangle = 0$ defines a line perpendicular to $a$, while $\langle\psi_1, l\rangle = 0$ defines a line perpendicular to $l$. Rotating both vectors by $\frac{\pi}{2}$ preserves their angular separation modulo $\pi$. The four boundary rays divide the plane into alternating sectors: two with angular measure $\phi$, where the signs of the inner products differ, and two with angular measure $\pi - \phi$, where the signs agree. As a check, $2\phi + 2(\pi-\phi) = 2\pi$. Which pair of sectors is wider depends on whether $\phi$ is acute or obtuse, but this does not affect the formula.

Artyom receives a point precisely when the direction lies in one of the sectors of angular measure $\phi$. Since the direction is uniformly distributed,

$$\P(\text{Artyom scores}) = \frac{2\phi}{2\pi} = \frac{\phi}{\pi}$$

This is exactly the formula derived for the plane in problem b0904.

Step 4. Apply the law of large numbers. The rounds are independent and identically distributed, and points are only awarded, so Artyom's score is simply the number of rounds he wins. The ratio of his score to the number of rounds is the frequency of this event, which converges to its probability:

$$\frac{\text{Artyom's score}}{\text{number of rounds}} \longrightarrow \frac{\phi}{\pi} = \frac{1}{\pi}\arccos\frac{\langle a,l\rangle}{\|a\|\,\|l\|}$$

Substitute the given vectors. We have $\langle a,l\rangle = 1$, $\|a\| = 1$, and $\|l\| = \sqrt2$. Hence $\cos\phi = \frac{1}{\sqrt2}$ and $\phi = \frac{\pi}{4}$.

$$\frac{\phi}{\pi} = \frac{\pi/4}{\pi} = \frac14 = 0.2500$$
A common wrong turn

It is tempting to calculate the score margin. If $p = 1 - \phi/\pi$ denotes Lyosha's share of the rounds, then the difference $p - (1 - p) = 2p - 1$ equals $0.5$, which looks appealing. But that answers a different question: this calculation would apply if a point were deducted for losing a round. The problem explicitly states that points are only awarded, so we need the share itself, not the margin.

As a reasonableness check, the answer must lie in $[0, 1]$ and approach zero as $\phi \to 0$, when the vectors point in nearly the same direction and Artyom has almost no chance of scoring. The formula $\phi/\pi$ satisfies both conditions.

Three ideas in one problem

First: projection preserves inner products with vectors in the subspace, allowing us to flatten a high-dimensional problem into a planar one.

Second: the direction of a normal vector is uniformly distributed. This connects linear algebra with the geometric probability studied on Day 2.

Third: the law of large numbers turns the ratio of points to rounds into the probability of the outcome in a single round.

None of these ideas is difficult on its own, and any one of them could readily appear on YMLS. What makes this a SHAD-level problem is the need to combine all three.

уверенность1 — угадал, 5 — уверен полностью
зачем это сегодня
RU

В основе задачи y1001 — официальная YMLS Practice Problem 3, Q1: даны длины трёх векторов и часть попарных скалярных произведений, известно, что векторы линейно зависимы, нужно найти недостающее произведение. Это в чистом виде матрица Грама — приём почти не преподают в базовом курсе, а школа ставит его в свои официальные материалы. В исходной формулировке, однако, геометрически реализуемы оба корня, $11$ и $4.6$; официальный разбор выбирает $11$ без условия, которое исключало бы $4.6$. Поэтому в версии курса явно добавлено условие об одной полуплоскости. Теперь задача однозначна и её стоит разобрать до последнего корня: именно дополнительное условие завершает решение.

Вторая причина — формат. На онлайн-этапе принимается только число, поэтому вопрос «при каких $a$ система несовместна» приходит в виде «найдите сумму всех таких $a$». Такая формулировка беспощадна: если ты нашёл корни определителя и сдал их сумму, не проверив каждый корень отдельно, ответ будет неверным, а частичных баллов за верный ход здесь не бывает. Разбор случаев на онлайн-этапе — не оформление, а часть вычисления.

И третья: линейная алгебра лежит под каждой моделью машинного обучения. Обучить линейную регрессию — значит решить систему $A^{T}A\,\mathbf{w} = A^{T}\mathbf{b}$, а вопрос «единственна ли эта $\mathbf{w}$» — это вопрос сегодняшнего дня про ранг и определитель. Тождество $\rank(A^{T}A) = \rank A$, которым закрывается задача s1001, — ровно то место, где сходятся экзамен и предмет.

EN

Problem y1001 is based on official YMLS Practice Problem 3, Q1: the lengths of three vectors and some pairwise dot products are given, the vectors are known to be linearly dependent, and the missing dot product must be found. This is the Gram matrix in its pure form — a technique barely taught in a basic course, yet included in the school’s official materials. In the original wording, however, both roots, $11$ and $4.6$, are geometrically realizable; the official solution chooses $11$ without a condition that rules out $4.6$. The course version therefore explicitly adds a same-half-plane condition. The problem is now unambiguous, and it should be taken through the final root: the extra condition is what completes the solution.

The second reason is the format. The online round accepts only a number, so “for which $a$ is the system inconsistent?” appears as “find the sum of all such $a$.” This wording is unforgiving: if you find the determinant roots and submit their sum without checking each root, the answer is wrong, and there are no partial points for a correct intermediate step. Case analysis in the online round is not presentation; it is part of the calculation.

And third: linear algebra underlies every machine-learning model. Training a linear regression means solving $A^{T}A\,\mathbf{w} = A^{T}\mathbf{b}$, and asking whether this $\mathbf{w}$ is unique is today’s question about rank and determinants. The identity $\rank(A^{T}A) = \rank A$, which closes problem s1001, is exactly where the exam and the subject meet.

Навыки по порядку

Тема разбита на отдельные навыки от простого к сложному. Для каждого указаны тренировочные задачи.

  1. 1Определитель 2×2 и признак вырожденностиThe $2\times2$ determinant and singularity testСчитаешь $ad - bc$ и читаешь нулевой ответ не как число, а как утверждение: строки пропорциональны, единственного решения нетCalculate $ad - bc$ and read a zero not as a number but as a statement: the rows are proportional, so there is no unique solutionW1001W1002
  2. 2Определитель 3×3 и 4×4: сначала структура, потом разложениеThe $3\times3$ and $4\times4$ determinant: structure before expansionТот же признак, но матрица больше: разложение по строке сводит её к определителям предыдущего навыка, поэтому первым делом ищешь, чем разложения избежать, — нули, общий множитель строки, пропорциональные строки, степени узлов в форме ВандермондаThe same test for a larger matrix: expanding along a row reduces it to determinants from the previous skill, so first look for a way to avoid expansion — zeros, a common row factor, proportional rows, or node powers in Vandermonde formB1001B1003Y1003Y1002
  3. 3Гаусс, ранг и Кронекер — КапеллиGaussian elimination, rank, and Rouché–CapelliИнструмент ровно на те случаи, где определитель предыдущего навыка молчит: он обратился в ноль или его нет вовсе, потому что матрица неквадратная. Приводишь расширенную матрицу к ступенчатому виду тремя допустимыми действиями, считаешь ненулевые строки — это ранг — и по сравнению двух рангов называешь исход, не доводя решение до концаThe tool for cases where the previous determinant test is silent: the determinant is zero or does not exist because the matrix is rectangular. Reduce the augmented matrix to row-echelon form with three allowed operations, count nonzero rows — the rank — and compare the two ranks to name the outcome without solving to the endW1003B1004B1006
  4. 4Система с параметром: сперва det, потом особые случаи рукамиA parameterized system: det first, then exceptional cases by handСоединяешь два предыдущих навыка в одну процедуру: определителем находишь корни, все прочие значения параметра объявляешь случаем единственного решения, а каждый корень подставляешь обратно в систему и гоняешь по нему Гаусс отдельноCombine the two previous skills: find determinant roots, call every other parameter value the unique-solution case, substitute each root back into the system, and run Gaussian elimination separately for itB1004B1003B1006Y1004
  5. 5Матрица ГрамаGram matrixТа же развилка «корней два, выбирает не алгебра», но неизвестная стоит уже внутри матрицы: собираешь из длин и попарных произведений таблицу $G_{ij} = \langle v_i, v_j\rangle$, приравниваешь её определитель нулю и из двух корней выбираешь тот, который проходит по дополнительному условию задачиThe same fork — two roots, and algebra does not choose between them — but the unknown is inside the matrix: build $G_{ij} = \langle v_i, v_j\rangle$ from lengths and pairwise products, set its determinant to zero, and choose the root that satisfies the problem’s extra conditionW1004B1007Y1001
  6. 6Ранг как аргумент о размереRank as an argument about sizeТа же идея, что и в матрице Грама, — конфигурация без координат превращается в таблицу чисел, — только таблица собирается из нулей и единиц, а ответ читается не определителем, а сравнением рангов, опираясь на $\rank(AB) \le \min(\rank A, \rank B)$ и $\rank(A^{T}A) = \rank A$The Gram-matrix idea again — turn a coordinate-free configuration into a table of numbers — but this table contains zeros and ones, and the answer is read from comparing ranks rather than a determinant, using $\rank(AB) \le \min(\rank A, \rank B)$ and $\rank(A^{T}A) = \rank A$B1002B1005S1001

Расписание

0:00–0:15РазогревWarm-up Девять пунктов блока «Мост» вслух, без конспекта. Отдельно проверь два вчерашних: чему равно $\langle v,v\rangle$ и когда Коши — Буняковский обращается в равенство. Сегодня оба понадобятся в матрице Грама.Say the nine points in the “Bridge” block aloud, without notes. Check two from yesterday in particular: what is $\langle v,v\rangle$, and when does Cauchy–Schwarz become an equality? Both are needed in the Gram matrix today.
0:15–1:35УрокLesson С бумагой. Метод Гаусса прогоняй руками, столбиком, на расширенной матрице: в уме он не усваивается и на экзамене разваливается. Эталонную задачу решай параллельно с чтением, а не после.Use paper. Run Gaussian elimination by hand, in a column, on the augmented matrix: it will not stick if you do it mentally and it will fall apart on the exam. Solve the model problem alongside the reading, not afterward.
1:35–3:20ЗадачиProblems Первые десять минут, до 1:45, — дриль на определители из блока «Практика». Дальше по ступеням 1 → 4: разминка устно, потом ступень 2, потом четыре обязательные задачи ступени 3, потом финалы.For the first ten minutes, until 1:45, do the determinant drill from “Practice.” Then work through levels 1 → 4: warm-up aloud, then Level 2, then the four mandatory Level 3 problems, then the finals.
3:20–3:45Мини-тестMini-test y1004 под таймером, в режиме экзамена: подсказка и разбор закрыты, ответ вводится один раз. Читай вопрос дважды: спрашивают не корни определителя.Do y1004 under time pressure, in exam mode: hints and the solution are closed, and the answer is entered once. Read the question twice: it is not asking for the determinant roots.
3:45–4:00АудитAudit Критерии внизу страницы и журнал ошибок с разделением на два типа.Use the criteria at the bottom of the page and log errors by the two types.

Урок

разбираем с нуля
RU

Вход: система, ответ которой зависит от буквы

В школьных примерах систему обычно решают подстановкой и сразу ищут пару чисел, не задавая отдельно вопрос «сколько решений?». Поставим в коэффициент букву: $ax + y = 1$, $x + ay = 1$. Из первого уравнения $y = 1-ax$; после подстановки во второе получается $(1-a^2)x = 1-a$. Для общего случая хочется разделить на $1-a^2$, но при $a = \pm1$ этот коэффициент равен нулю — и эти два значения надо разобрать отдельно. При $a = 1$ оба уравнения превращаются в $x + y = 1$, и решений бесконечно много; при $a = -1$ получается $-x + y = 1$ и $x - y = 1$, сложение даёт $0 = 2$, и решений нет вовсе; при всех прочих $a$ решение единственно. Три исхода вместо одного — это и есть содержание дня, а инструментов будет три: метод Гаусса (универсальный, но медленный), ранг (сколько в системе настоящей, неповторяющейся информации) и определитель (одно число, отвечающее на вопрос «решение единственно?» ещё до того, как система решена).

Матрица и система

Матрица размера $m \times n$ — таблица чисел из $m$ строк и $n$ столбцов. Нужна она затем, что компактно записывает систему: $2x + y = 5$, $x - 3y = -1$ превращается в $A\mathbf{x} = \mathbf{b}$ со строками $(2,1)$ и $(1,-3)$, столбцом $\mathbf{x} = (x, y)^{T}$ и правой частью $\mathbf{b} = (5, -1)^{T}$. Работает это потому, что $i$-я координата произведения $A\mathbf{x}$ — скалярное произведение $i$-й строки матрицы на $\mathbf{x}$: вчерашняя операция, применённая построчно. По тому же правилу устроено произведение матриц, $(AB)_{ij}$ — скалярное произведение $i$-й строки $A$ на $j$-й столбец $B$, поэтому столбцов у $A$ должно быть столько же, сколько строк у $B$, и, вообще говоря, $AB \ne BA$ даже там, где существуют оба произведения. Транспонирование $A^{T}$ переворачивает таблицу относительно главной диагонали.

Метод Гаусса

Идея: превратить систему в ступенчатую, где каждое следующее уравнение содержит меньше неизвестных, и пройти её снизу вверх. Работают при этом не с уравнениями, а с расширенной матрицей $[A \mid \mathbf{b}]$ — матрицей системы с приписанным справа столбцом правых частей: переписывать на каждом шаге буквы $x$, $y$, $z$ незачем, вся информация в числах. Разрешено ровно три действия, и ни одно не меняет множество решений: переставить две строки; умножить строку на ненулевое число; прибавить к одной строке другую, умноженную на число.

Пример. Система $x + y + z = 6$, $2x + 3y - z = 5$, $x - y + 2z = 5$. Вычитаем удвоенную первую строку из второй и первую из третьей, затем к третьей прибавляем удвоенную вторую:

$$\left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 2 & 3 & -1 & 5 \\ 1 & -1 & 2 & 5 \end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -3 & -7 \\ 0 & -2 & 1 & -1 \end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -3 & -7 \\ 0 & 0 & -5 & -15 \end{array}\right)$$

Последняя строка читается как $-5z = -15$, откуда $z = 3$. Обратный ход: $y - 9 = -7$, значит $y = 2$; затем $x + 2 + 3 = 6$, значит $x = 1$. Проверка подстановкой во второе уравнение: $2 + 6 - 3 = 5$ ✓.

Что вышло внизуСколько решенийГеометрия для двух переменных
Ступенчатый вид, ведущий элемент в каждом столбцеровно однопрямые пересекаются в точке
Строка вида $0 = c$, где $c \ne 0$ни одногопрямые параллельны
Строка вида $0 = 0$, есть столбцы без ведущего элементабесконечно многопрямые совпали

Третий случай в школе обычно проскакивают, а на экзаменах он встречается постоянно.

Ранг и критерий Кронекера — Капелли

Строка $0 = 0$ появляется не случайно: она означает, что одно из уравнений не сообщало ничего нового и получалось из остальных.

Линейная зависимость и ранг

Набор строк $v_1, \ldots, v_k$ линейно зависим, если какая-то комбинация $c_1v_1 + \cdots + c_kv_k$ с не всеми нулевыми коэффициентами даёт нулевую строку. Для двух строк это в точности пропорциональность, для трёх и больше — уже нет. $\rank A$ — максимальное число линейно независимых строк; оно всегда совпадает с максимальным числом независимых столбцов, поэтому $\rank A^{T} = \rank A$. Считается ранг Гауссом: приводим к ступенчатому виду и считаем ненулевые строки.

Критерий Кронекера — Капелли

Система $A\mathbf{x} = \mathbf{b}$ с $n$ неизвестными совместна (имеет хотя бы одно решение) тогда и только тогда, когда $\rank A = \rank[A \mid \mathbf{b}]$. Если этот общий ранг равен $n$, решение единственно; если меньше $n$, решений бесконечно много, и свободных переменных ровно $n - \rank A$.

Строка $0 = c$ при $c \ne 0$ — это буквально $\rank A < \rank[A \mid \mathbf{b}]$: приписанный столбец добавил матрице независимую строку, а сама $A$ такой строки не имела. Возьмём $x + 2y + 3z = 1$, $2x + 4y + 6z = \beta$, $x + 3y + 5z = 3$: у матрицы вторая строка вдвое больше первой, поэтому $\rank A = 2$ при любом $\beta$. При $\beta = 2$ вдвое больше и всё второе уравнение целиком, ранги совпадают, свободных переменных $3 - 2 = 1$, решения образуют прямую $(-3 + t,\ 2 - 2t,\ t)$. При $\beta = 3$ второе уравнение противоречит первому, ранг расширенной матрицы становится 3, и решений нет ни одного.

Зачем ранг, если есть Гаусс

Затем, что вопрос экзамена обычно звучит «сколько решений», а не «какие». И главное: у неквадратной системы определителя нет вообще, Кронекер — Капелли остаётся единственным.

Определитель

Для квадратной матрицы есть одно число, отвечающее на вопрос о единственности решения. Для $2\times2$ это $ad - bc$. Для $3\times3$ — разложение по строке: берём элементы строки, каждый умножаем на определитель матрицы, оставшейся после вычёркивания его строки и столбца, и чередуем знаки. Для матрицы из строк $(2,1,0)$, $(1,3,1)$, $(0,2,4)$ это даёт

$$2\begin{vmatrix} 3 & 1 \\ 2 & 4\end{vmatrix} - 1\begin{vmatrix} 1 & 1 \\ 0 & 4\end{vmatrix} + 0\begin{vmatrix} 1 & 3 \\ 0 & 2\end{vmatrix} = 2(12 - 2) - 1(4 - 0) + 0 = 16$$

Раскладывать можно по любой строке и по любому столбцу; знак элемента в позиции $(i,j)$ равен $(-1)^{i+j}$, то есть шахматный порядок начинается с плюса в левом верхнем углу. Четыре свойства, которые экономят время:

  • $\det A^{T} = \det A$, поэтому со столбцами можно работать так же, как со строками;
  • прибавление к строке другой строки, умноженной на число, определитель не меняет; перестановка двух строк меняет знак; умножение строки на $\lambda$ умножает на $\lambda$ весь определитель;
  • если строки линейно зависимы (одна пропорциональна другой или равна сумме остальных), определитель равен нулю;
  • $\det(AB) = \det A \cdot \det B$.

Из второго свойства следует, что определитель считается тем же Гауссом: приводим матрицу к треугольному виду одними прибавлениями, и он равен произведению того, что осталось на диагонали. В примере из раздела о методе Гаусса на диагонали оказались $1$, $1$, $-5$: определитель той матрицы равен $-5$, он не нуль, и это согласуется с единственностью решения.

Вандермонд. Одну структуру стоит узнавать в лицо: если в каждой строке стоят степени одного и того же узла от нулевой до $(n-1)$-й, то есть строки имеют вид $(1,\ x_i,\ x_i^2,\ \ldots)$, это матрица Вандермонда, и её определитель равен $\prod_{i<j}(x_j - x_i)$ — произведению всех разностей узлов; из $\det A^{T} = \det A$ то же верно, когда такой вид имеют не строки, а столбцы. Следствие важнее формулы: он нулевой тогда и только тогда, когда среди узлов есть два совпадающих.

Правило экономии

Раскладывай по той строке или столбцу, где больше нулей: каждый ноль убирает целое слагаемое. Нулей нет — сделай их сам прибавлением строк, это бесплатно. Знаковые ошибки в определителях — поставщик номер один потерянных баллов, поэтому проверяй вторым разложением.

Главное равенство дня$$\det A \ne 0 \iff \text{система } A\mathbf{x} = \mathbf{b} \text{ имеет ровно одно решение при любой правой части}$$

Геометрически $|\det A|$ — это во сколько раз преобразование $\mathbf{x} \mapsto A\mathbf{x}$ растягивает площадь или объём; ноль означает, что пространство сплющено в прямую или в точку, информация потеряна и восстановить исходный вектор однозначно уже нельзя. При $\det A \ne 0$ существует обратная матрица $A^{-1}$ с условием $AA^{-1} = I$, решение записывается как $\mathbf{x} = A^{-1}\mathbf{b}$, а для $2\times2$ она равна $\frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a\end{pmatrix}$. Есть и бесплатный признак: если в каждой строке модуль диагонального элемента строго больше суммы модулей остальных (строгое диагональное преобладание), матрица невырождена.

Система с параметром: главный сюжет дня

Алгоритм разбора системы с параметром
  1. Система квадратная? Если нет — определителя не существует, сразу Кронекер — Капелли.
  2. Посчитай $\det A$ как многочлен от параметра и разложи его на множители.
  3. При всех значениях параметра, кроме корней этого многочлена, решение ровно одно. Это весь общий случай, и он закрыт.
  4. Каждый корень подставь обратно в систему по одному и прогони Гаусс руками: строка $0 = c$ означает «решений нет», строка $0 = 0$ — «бесконечно много».

Четвёртый пункт — тот, на котором теряют баллы. Корни определителя не делятся на «плохие» и «хорошие» заранее: один может давать несовместную систему, а другой — бесконечное множество решений, и различает их только подстановка. Ровно это делает эталонная задача ниже.

Матрица Грама

Теперь линия, ради которой этот день стоит в программе именно перед экзаменом YMLS. Задача такого типа: даны несколько векторов, известны их длины и часть попарных скалярных произведений, известно, что векторы линейно зависимы, найти недостающее произведение. Координат нет и ввести их негде, а прямой путь — искать коэффициенты разложения — длинный.

Матрица Грама

Для векторов $v_1, \ldots, v_k$ составим таблицу всех попарных скалярных произведений $G_{ij} = \langle v_i, v_j\rangle$. Матрица симметрична, на диагонали стоят квадраты длин, и тогда

$$\{v_i\} \text{ линейно зависимы} \iff \det G = 0$$

Всегда $\det G \ge 0$, и он равен квадрату объёма параллелепипеда на этих векторах.

Почему это верно, видно уже на двух векторах: $\det G = \|u\|^2\|v\|^2 - \langle u,v\rangle^2 = \|u\|^2\|v\|^2(1 - \cos^2\varphi) = (\|u\|\,\|v\|\sin\varphi)^2$, то есть в точности квадрат площади параллелограмма. Он неотрицателен и равен нулю ровно тогда, когда $\sin\varphi = 0$, то есть векторы коллинеарны — это тот же случай равенства в Коши — Буняковском. В размерности $k$ рассуждение то же: зависимые векторы лежат в подпространстве меньшей размерности, «объём» на них нулевой. Считают отсюда так: неизвестное произведение обозначается буквой и ставится в две симметричные клетки таблицы, $\det G$ становится многочленом от буквы, условие зависимости даёт уравнение $\det G = 0$, и для трёх векторов оно квадратное.

Двух корней надо ждать заранее

Квадратное уравнение даёт два значения, и оба, как правило, геометрически реализуемы: они отвечают двум конфигурациям — вектор отклонён в ту же сторону или в другую. Выбор делает не алгебра, а дополнительное условие в тексте задачи: полуплоскость, знак угла, различность векторов. Ищи это условие до того, как начнёшь решать квадратное уравнение, иначе решишь задачу наполовину.

Отдельно стоит запомнить частный факт: в $\mathbb{R}^n$ любые $n+1$ векторов линейно зависимы, поэтому в плоской задаче условие $\det G = 0$ для трёх векторов выполнено автоматически: его не надо доказывать, им надо пользоваться.

Ранг как аргумент о размере

Последний сюжет дня: ранг применяется не для того, чтобы что-то посчитать, а чтобы что-то доказать. Нужны три факта.

  • $\rank(AB) \le \min(\rank A, \rank B)$: произведение не может быть богаче информацией, чем любой из множителей.
  • $\rank(A^{T}A) = \rank A$ для любой вещественной матрицы. Из $A^{T}A\mathbf{x} = 0$ следует $\mathbf{x}^{T}A^{T}A\mathbf{x} = \|A\mathbf{x}\|^2 = 0$, а значит и $A\mathbf{x} = 0$; обратное очевидно. У $A$ и $A^{T}A$ совпадают множества решений однородной системы, а с ними число свободных переменных, а с ним и ранг. Тем же рассуждением $\rank(AA^{T}) = \rank A^{T} = \rank A$.
  • Если $J$ — квадратная матрица из одних единиц, а $D$ — диагональная с положительными элементами, то $J + D$ невырождена: для любого ненулевого $\mathbf{x}$ величина $\mathbf{x}^{T}(J + D)\mathbf{x} = \left(\sum_i x_i\right)^2 + \sum_i d_i x_i^2$ строго положительна, поэтому равенство $(J + D)\mathbf{x} = 0$ невозможно.

Вместе это даёт приём: закодируй конфигурацию из условия матрицей нулей и единиц и посмотри, что означают $AA^{T}$ и $A^{T}A$. Если обе оказываются вида «единицы плюс положительная диагональ», обе невырождены, их ранги равны своим размерам — и два разных размера обязаны совпасть, потому что оба равны $\rank A$. Так комбинаторная задача превращается в равенство двух чисел. Это и есть содержание задачи s1001.

Что должно остаться в голове

  1. Матрица кодирует систему; умножение на вектор — скалярные произведения по строкам.
  2. Гаусс работает с расширенной матрицей и тремя действиями; исход читается по последней строке: треугольник, $0 = c$ или $0 = 0$.
  3. $\rank A$ — число ненулевых строк ступенчатого вида, $\rank A^{T} = \rank A$; Кронекер — Капелли: совместность есть $\rank A = \rank[A\mid\mathbf{b}]$, единственность — равенство этого ранга числу неизвестных, свободных переменных $n - \rank A$.
  4. Определитель: $ad - bc$, разложение по строке с чередованием знаков, треугольный вид Гаусса как второй способ; ноль означает зависимость строк, а $\det A \ne 0$ — единственность решения, но только у квадратной системы.
  5. Вандермонд узнаётся по степеням одних и тех же узлов в строках (или, что то же, в столбцах) и считается произведением разностей $\prod_{i<j}(x_j - x_i)$.
  6. Параметр: посчитал определитель, разложил на множители, все прочие значения — один случай, каждый корень — отдельный разбор руками.
  7. Матрица Грама: диагональ из квадратов длин, $\det G = 0 \iff$ векторы зависимы, $\det G$ — квадрат объёма; два корня разделяются условием задачи.
  8. $\rank(AB) \le \min(\rank A, \rank B)$ и $\rank(A^{T}A) = \rank A$ — инструменты доказательства, а не счёта.
EN

Opening: a system whose answer depends on a letter

In school examples, a system is usually solved by substitution, and you immediately look for a pair of numbers without asking separately “how many solutions are there?” Put a letter in the coefficients: $ax + y = 1$, $x + ay = 1$. From the first equation, $y = 1-ax$; substituting into the second gives $(1-a^2)x = 1-a$. In the general case, you want to divide by $1-a^2$, but at $a = \pm1$ this coefficient is zero — and those two values must be analyzed separately. At $a = 1$, both equations become $x + y = 1$, giving infinitely many solutions. At $a = -1$, they become $-x + y = 1$ and $x - y = 1$; adding them gives $0 = 2$, so there are no solutions. For every other $a$, the solution is unique. Three outcomes instead of one — that is the content of the day, with three tools: Gaussian elimination (universal but slow), rank (how much genuine, non-repeated information the system contains), and the determinant (one number that answers “is the solution unique?” before the system itself is solved).

Matrix and system

A matrix of size $m \times n$ is a table of numbers with $m$ rows and $n$ columns. Its purpose is to record a system compactly: $2x + y = 5$, $x - 3y = -1$ becomes $A\mathbf{x} = \mathbf{b}$ with rows $(2,1)$ and $(1,-3)$, column $\mathbf{x} = (x, y)^{T}$, and right-hand side $\mathbf{b} = (5, -1)^{T}$. This works because the $i$th coordinate of $A\mathbf{x}$ is the dot product of the matrix’s $i$th row with $\mathbf{x}$ — yesterday’s operation applied row by row. Matrix multiplication follows the same rule: $(AB)_{ij}$ is the dot product of row $i$ of $A$ and column $j$ of $B$. Therefore $A$ must have as many columns as $B$ has rows, and generally $AB \ne BA$, even where both products exist. Transposition $A^{T}$ flips the table across its main diagonal.

Gaussian elimination

The idea is to turn a system into row-echelon form, where each successive equation contains fewer unknowns, and then work upward from the bottom. We operate not on equations but on the augmented matrix $[A \mid \mathbf{b}]$ — the system matrix with the right-hand-side column appended: there is no need to rewrite $x$, $y$, and $z$ at every step, because all information is in the numbers. Exactly three operations are allowed, and none changes the solution set: swap two rows; multiply a row by a nonzero number; add to one row another row multiplied by a number.

Example. System $x + y + z = 6$, $2x + 3y - z = 5$, $x - y + 2z = 5$. Subtract twice the first row from the second and the first from the third, then add twice the second to the third:

$$\left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 2 & 3 & -1 & 5 \\ 1 & -1 & 2 & 5 \end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -3 & -7 \\ 0 & -2 & 1 & -1 \end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -3 & -7 \\ 0 & 0 & -5 & -15 \end{array}\right)$$

The last row reads $-5z = -15$, so $z = 3$. Back-substitution: $y - 9 = -7$, hence $y = 2$; then $x + 2 + 3 = 6$, hence $x = 1$. Check by substituting into the second equation: $2 + 6 - 3 = 5$ ✓.

What appears at the bottomNumber of solutionsGeometry for two variables
Row-echelon form with a pivot in every columnexactly onelines intersect at one point
A row $0 = c$ with $c \ne 0$noneparallel lines
A row $0 = 0$ and columns without a pivotinfinitely manycoincident lines

The third case is often skipped at school, but it appears constantly on exams.

Rank and the Rouché–Capelli theorem

The row $0 = 0$ does not appear by accident: it means one equation added no new information and was generated by the others.

Linear dependence and rank

A set of rows $v_1, \ldots, v_k$ is linearly dependent if some combination $c_1v_1 + \cdots + c_kv_k$, with not all coefficients zero, gives the zero row. For two rows this is exactly proportionality; for three or more, it is not. $\rank A$ is the maximum number of linearly independent rows; it always equals the maximum number of independent columns, so $\rank A^{T} = \rank A$. Compute rank with Gaussian elimination: reduce to row-echelon form and count the nonzero rows.

Rouché–Capelli theorem

A system $A\mathbf{x} = \mathbf{b}$ with $n$ unknowns is consistent (has at least one solution) if and only if $\rank A = \rank[A \mid \mathbf{b}]$. If this common rank is $n$, the solution is unique; if it is less than $n$, there are infinitely many solutions, with exactly $n - \rank A$ free variables.

The row $0 = c$ with $c \ne 0$ is literally $\rank A < \rank[A \mid \mathbf{b}]$: the appended column added an independent row, which $A$ did not have. Take $x + 2y + 3z = 1$, $2x + 4y + 6z = \beta$, $x + 3y + 5z = 3$. The second row of $A$ is twice the first, so $\rank A = 2$ for every $\beta$. At $\beta = 2$, the right side also doubles and the second equation is entirely redundant; the ranks match, there are $3 - 2 = 1$ free variables, and the solutions form the line $(-3 + t,\ 2 - 2t,\ t)$. At $\beta = 3$, the second equation contradicts the first, the augmented rank becomes 3, and there are no solutions.

Why rank if we have Gaussian elimination

Because the exam usually asks “how many solutions?” rather than “what are they?” More importantly, a rectangular system has no determinant at all; Rouché–Capelli remains the only criterion.

Determinant

For a square matrix, one number answers the question of whether the solution is unique. For $2\times2$ it is $ad - bc$. For $3\times3$, expand along a row: multiply each entry by the determinant of the matrix left after crossing out its row and column, and alternate the signs. For the matrix with rows $(2,1,0)$, $(1,3,1)$, $(0,2,4)$:

$$2\begin{vmatrix} 3 & 1 \\ 2 & 4 \end{vmatrix} - 1\begin{vmatrix} 1 & 1 \\ 0 & 4 \end{vmatrix} + 0\begin{vmatrix} 1 & 3 \\ 0 & 2 \end{vmatrix} = 2(12 - 2) - 1(4 - 0) + 0 = 16$$

You may expand along any row or column; the sign at position $(i,j)$ is $(-1)^{i+j}$, a checkerboard pattern beginning with plus in the upper-left corner. Four properties save time:

  • $\det A^{T} = \det A$, so columns can be treated just like rows;
  • adding a multiple of one row to another does not change the determinant; swapping two rows changes its sign, and multiplying a row by $\lambda$ multiplies the entire determinant by $\lambda$;
  • if rows are linearly dependent (one is proportional to another or equals a sum of the others), the determinant is zero;
  • $\det(AB) = \det A \cdot \det B$.

The second property means you can calculate a determinant with the same Gaussian elimination: reduce the matrix to triangular form using additions only, and it equals the product of the remaining diagonal entries. In the Gaussian-elimination example, the diagonal entries are $1$, $1$, and $-5$; the determinant is $-5$, not zero, which agrees with the unique solution.

Vandermonde. One structure is worth recognizing at a glance: if each row contains powers of the same node from zero through $(n-1)$, so the rows look like $(1,\ x_i,\ x_i^2,\ \ldots)$, this is a Vandermonde matrix, and its determinant is $\prod_{i<j}(x_j - x_i)$ — the product of all node differences. Since $\det A^{T} = \det A$, the same is true when this pattern appears in columns rather than rows. The consequence matters more than the formula: it is zero if and only if two nodes coincide.

A time-saving rule

Expand along the row or column with the most zeros: each zero removes an entire term. If there are no zeros, create them by adding rows — that is free. Sign errors are the number-one source of lost determinant points, so check with a second expansion.

The day’s main equality$$\det A \ne 0 \iff \text{system } A\mathbf{x} = \mathbf{b} \text{ has exactly one solution for every right-hand side}$$

Geometrically, $|\det A|$ is how much the transformation $\mathbf{x} \mapsto A\mathbf{x}$ scales area or volume; zero means space has been flattened into a line or a point, information has been lost, and the original vector can no longer be recovered uniquely. When $\det A \ne 0$, an inverse matrix $A^{-1}$ exists with $AA^{-1} = I$, and the solution is $\mathbf{x} = A^{-1}\mathbf{b}$. For $2\times2$, it is $\frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a\end{pmatrix}$. There is also a free test: if in every row the diagonal entry’s absolute value is strictly greater than the sum of the absolute values of the other entries (strict diagonal dominance), the matrix is nonsingular.

Parameterized system: the day’s main storyline

Algorithm for analyzing a parameterized system
  1. Is the system square? If not, there is no determinant; go straight to Rouché–Capelli.
  2. Calculate $\det A$ as a polynomial in the parameter and factor it.
  3. For every parameter value except the roots of this polynomial, the solution is exactly one. This is the complete general case.
  4. Substitute each root back into the system one at a time and run Gaussian elimination by hand: $0 = c$ means no solutions, while $0 = 0$ means infinitely many.

The fourth point is where marks are lost. Determinant roots cannot be divided in advance into “bad” and “good”: one may give an inconsistent system and another infinitely many solutions, and only substitution distinguishes them. That is exactly what the model problem below demonstrates.

Gram matrix

This is the thread that puts today immediately before the YMLS exam. In this type of problem, several vectors are given, their lengths and some pairwise dot products are known, the vectors are linearly dependent, and a missing product must be found. There are no coordinates and nowhere to introduce them; the direct route of finding decomposition coefficients is long.

Gram matrix

For vectors $v_1, \ldots, v_k$, make a table of all pairwise dot products $G_{ij} = \langle v_i, v_j\rangle$. The matrix is symmetric, with squared lengths on the diagonal, and then

$$\{v_i\} \text{ linearly dependent} \iff \det G = 0$$

Always $\det G \ge 0$, and it equals the square of the volume of the parallelepiped spanned by these vectors.

Why this is true is already visible for two vectors: $\det G = \|u\|^2\|v\|^2 - \langle u,v\rangle^2 = \|u\|^2\|v\|^2(1 - \cos^2\varphi) = (\|u\|\,\|v\|\sin\varphi)^2$, exactly the squared area of the parallelogram. It is nonnegative and zero precisely when $\sin\varphi = 0$, meaning the vectors are collinear — the same equality case from Cauchy–Schwarz. In dimension $k$, the reasoning is the same: dependent vectors lie in a lower-dimensional subspace, so their “volume” is zero. The calculation is therefore: call the unknown product a letter and put it in the two symmetric cells of the table; $\det G$ becomes a polynomial in that letter; dependence gives $\det G = 0$; for three vectors, this is a quadratic equation.

Expect two roots

A quadratic equation gives two values, and both are usually geometrically realizable: they correspond to two configurations, with the vector tilted to one side or the other. The choice is made not by algebra but by an extra condition in the problem statement: a half-plane, the sign of an angle, or distinctness of vectors. Look for that condition before solving the quadratic, or you will solve only half the problem.

Remember one special fact: in $\mathbb{R}^n$, any $n+1$ vectors are linearly dependent. Therefore, in the planar case $\det G = 0$ for three vectors automatically; there is no need to prove it — use it.

Rank as an argument about size

The final storyline of the day uses rank not to calculate something but to prove something. Three facts are needed.

  • $\rank(AB) \le \min(\rank A, \rank B)$: a product cannot contain more information than either factor.
  • $\rank(A^{T}A) = \rank A$ for every real matrix. From $A^{T}A\mathbf{x} = 0$ we get $\mathbf{x}^{T}A^{T}A\mathbf{x} = \|A\mathbf{x}\|^2 = 0$, hence $A\mathbf{x} = 0$; the reverse implication is obvious. $A$ and $A^{T}A$ have the same solution set for the homogeneous system, and therefore the same number of free variables and the same rank. The same argument gives $\rank(AA^{T}) = \rank A^{T} = \rank A$.
  • If $J$ is a square matrix of ones and $D$ is diagonal with positive entries, then $J + D$ is nonsingular: for any nonzero $\mathbf{x}$, $\mathbf{x}^{T}(J + D)\mathbf{x} = \left(\sum_i x_i\right)^2 + \sum_i d_i x_i^2$ is strictly positive, so $(J + D)\mathbf{x} = 0$ is impossible.

Together these give a technique: encode the configuration in the statement with a zero–one matrix and see what $AA^{T}$ and $A^{T}A$ mean. If both have the form “ones plus a positive diagonal,” both are nonsingular and their ranks equal their sizes — so two different sizes must be equal because both equal $\rank A$. This turns a combinatorial problem into an equality between two numbers. That is the content of s1001.

What should stay in your head

  1. A matrix encodes a system; multiplication by a vector is a row-wise collection of dot products.
  2. Gaussian elimination uses the augmented matrix and three operations; read the outcome from the last row: echelon form, $0 = c$, or $0 = 0$.
  3. $\rank A$ is the number of nonzero rows in echelon form, and $\rank A^{T} = \rank A$; Rouché–Capelli says consistency is $\rank A = \rank[A\mid\mathbf{b}]$, uniqueness is equality of this rank with the number of unknowns, and the number of free variables is $n - \rank A$.
  4. Determinant: $ad - bc$, expansion along a row with alternating signs, and triangular Gaussian form as a second method; zero means dependent rows, while $\det A \ne 0$ means a unique solution, but only for a square system.
  5. Recognize Vandermonde by powers of the same nodes in rows (or equivalently columns), and calculate it as the product of differences $\prod_{i<j}(x_j - x_i)$.
  6. Parameter: calculate the determinant, factor it, treat all other values as one case, and analyze each root separately by hand.
  7. Gram matrix: diagonal of squared lengths, $\det G = 0 \iff$ vectors are dependent, and $\det G$ is squared volume; use the problem’s condition to distinguish the two roots.
  8. $\rank(AB) \le \min(\rank A, \rank B)$ and $\rank(A^{T}A) = \rank A$ are proof tools, not calculation tools.

Признаки и действия

Слева — что заметить в условии. Справа — что сделать первым.

УвиделПервый ход
В условии стоит «при каких значениях $a$», система квадратнаяThe statement asks “for which values of $a$?” and the system is squareСчитай определитель как многочлен от $a$ и раскладывай его на множители: его корни — единственные подозрительные значенияCalculate the determinant as a polynomial in $a$ and factor it; its roots are the only suspicious parameter values
Определитель обратился в нольThe determinant is zeroЭто не ответ, а развилка: подставь это значение параметра обратно в систему и прогони Гаусс рукамиThis is not the answer but a fork: substitute that parameter value back into the system and run Gaussian elimination by hand
После Гаусса получилась строка $0 = c$ при $c \ne 0$Gaussian elimination gives a row $0 = c$ with $c \ne 0$Решений нет, противоречие уже найдено, ранги сравнивать не нужноThere are no solutions; the contradiction is already found, so ranks need not be compared
После Гаусса получилась строка $0 = 0$Gaussian elimination gives a row $0 = 0$Это ещё не ответ: посмотри на столбцы. Есть столбец без ведущего элемента, то есть $\rank A < n$, — решений бесконечно много, свободных переменных ровно $n - \rank A$; ведущий элемент есть в каждом столбце — решение единственноThis is not yet an answer: inspect the columns. A column without a pivot means $\rank A < n$ and infinitely many solutions, with exactly $n - \rank A$ free variables; a pivot in every column means one solution
Уравнений и неизвестных разное числоThe numbers of equations and unknowns differОпределителя не существует, работает только Кронекер — Капелли: считай $\rank A$ и $\rank[A \mid \mathbf{b}]$There is no determinant; use only Rouché–Capelli: calculate $\rank A$ and $\rank[A \mid \mathbf{b}]$
Строка кратна другой или равна сумме остальныхOne row is a multiple of another or equals the sum of the othersОпределитель нулевой без единого вычисления, ранг заведомо меньше числа строкThe determinant is zero without calculation, and the rank is certainly smaller than the number of rows
Даны длины векторов и часть попарных скалярных произведений, спрашивают недостающееLengths of vectors and some pairwise dot products are given, and a missing one is requestedМатрица Грама: диагональ — квадраты длин, линейная зависимость равносильна $\det G = 0$Use a Gram matrix: squared lengths on the diagonal, and linear dependence is equivalent to $\det G = 0$
Строки матрицы — единицы, сами числа, квадраты этих чиселThe matrix rows contain ones, the numbers themselves, and their squaresВандермонд: определитель равен произведению всех разностей $x_j - x_i$ при $i < j$; из $\det A^{T} = \det A$ то же верно и для транспонированного расположения, когда единицы, числа и квадраты стоят по столбцамVandermonde: the determinant is the product of all differences $x_j - x_i$ for $i < j$; since $\det A^{T} = \det A$, the same applies in the transposed arrangement, with ones, numbers, and squares in columns
эталонная задача

Система с параметром: сначала определитель, потом каждый корень отдельноA parameterized system: determinant first, then each root separately

RU

Условие. При каких значениях параметра $a$ система

$$\begin{cases} x + y - z = 2 \\ 2x + 3y + az = 5 \\ x + ay + 3z = -2 \end{cases}$$

имеет единственное решение, при каких не имеет решений, при каких имеет их бесконечно много?

Смотреть надо не на числа, а на порядок ходов: та же последовательность закрывает b1004, мосты b1003 и b1006 и финал y1004.

Шаг 1. Решить, применим ли определитель. Три уравнения, три неизвестных — система квадратная, значит определитель есть и с него надо начинать. Будь уравнений четыре, этот шаг закончился бы словами «определителя нет» и переходом сразу к рангам.

Шаг 2. Считать не решение, а определитель. Раскладываем по первой строке:

$$\det A = \begin{vmatrix} 1 & 1 & -1 \\ 2 & 3 & a \\ 1 & a & 3\end{vmatrix} = (9 - a^2) - (6 - a) - (2a - 3) = 6 - a - a^2 = -(a - 2)(a + 3)$$

Проверка вторым способом обязательна, и здесь она получается даром: подставим $a = 0$ в исходную матрицу и посчитаем определитель заново — выйдет $9 - 6 + 3 = 6$, а формула при $a = 0$ даёт $-(-2)(3) = 6$ ✓.

Шаг 3. Закрыть общий случай одной фразой. При $a \ne 2$ и $a \ne -3$ определитель не равен нулю, значит решение существует и единственно. Больше про эти значения говорить нечего, и считать само решение не нужно: спрашивали количество.

Шаг 4. Каждый корень — отдельно, руками. Подставляем $a = 2$ и приводим расширенную матрицу к ступенчатому виду:

$$\left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 2 & 3 & 2 & 5 \\ 1 & 2 & 3 & -2\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & 1 & 4 & 1 \\ 0 & 1 & 4 & -4\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & 1 & 4 & 1 \\ 0 & 0 & 0 & -5\end{array}\right)$$

Последняя строка означает $0 = -5$. Решений нет.

Шаг 5. Второй корень, и он ведёт себя иначе. Подставляем $a = -3$:

$$\left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 2 & 3 & -3 & 5 \\ 1 & -3 & 3 & -2\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & 1 & -1 & 1 \\ 0 & -4 & 4 & -4\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & 1 & -1 & 1 \\ 0 & 0 & 0 & 0\end{array}\right)$$

Строка $0 = 0$. Ранг матрицы и ранг расширенной матрицы равны 2, неизвестных три, значит свободная переменная одна и решений бесконечно много: положив $z = t$, получаем $y = t + 1$ и $x = 2 - y + z = 1$, то есть $(1,\ t+1,\ t)$. Подстановка в третье уравнение: $1 - 3(t+1) + 3t = -2$ ✓.

Ответ. Единственное решение при $a \notin \{2, -3\}$; решений нет при $a = 2$; бесконечно много при $a = -3$.

Обрати внимание на главное: два корня одного и того же определителя дали разные ответы. Никакой признак, кроме подстановки, их не различал.

Алгоритм
  1. Проверь, квадратная ли система. Неквадратная — сразу к рангам, определителя нет.
  2. Посчитай $\det A$ как многочлен от параметра и разложи на множители; проверь одной подстановкой числа.
  3. Все значения параметра, кроме корней, — один общий случай: решение единственно, считать его не надо.
  4. Каждый корень подставь в систему по одному и прогони Гаусс: $0 = c$ — решений нет, $0 = 0$ — бесконечно много.
  5. В ответ выпиши то, что спросили: сумму подходящих значений, их количество или список. Сумму корней определителя без разбора сдавать нельзя.
EN

Problem. For which parameter values $a$ does the system

$$\begin{cases} x + y - z = 2 \\ 2x + 3y + az = 5 \\ x + ay + 3z = -2 \end{cases}$$

have a unique solution, have no solutions, or have infinitely many solutions?

Watch not the numbers but the order of the moves: the same sequence closes b1004, bridges b1003 and b1006, and final y1004.

Step 1. Decide whether the determinant applies. Three equations and three unknowns make a square system, so the determinant exists and must come first. If there were four equations, this step would end with “there is no determinant” and go straight to ranks.

Step 2. Calculate the determinant, not the solution. Expand along the first row:

$$\det A = \begin{vmatrix} 1 & 1 & -1 \\ 2 & 3 & a \\ 1 & a & 3\end{vmatrix} = (9 - a^2) - (6 - a) - (2a - 3) = 6 - a - a^2 = -(a - 2)(a + 3)$$

Checking by a second method is mandatory, and here it is free: substitute $a = 0$ into the original matrix and calculate the determinant again — it gives $9 - 6 + 3 = 6$, while the formula at $a = 0$ gives $-(-2)(3) = 6$ ✓.

Step 3. Close the general case in one sentence. For $a \ne 2$ and $a \ne -3$, the determinant is nonzero, so the solution exists and is unique. There is nothing more to say about these values, and you do not need to calculate the solution itself: the question asks how many.

Step 4. Each root, separately and by hand. Substitute $a = 2$ and reduce the augmented matrix:

$$\left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 2 & 3 & 2 & 5 \\ 1 & 2 & 3 & -2\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & 1 & 4 & 1 \\ 0 & 1 & 4 & -4\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & 1 & 4 & 1 \\ 0 & 0 & 0 & -5\end{array}\right)$$

The last row says $0 = -5$. There are no solutions.

Step 5. The second root behaves differently. Substitute $a = -3$:

$$\left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 2 & 3 & -3 & 5 \\ 1 & -3 & 3 & -2\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & 1 & -1 & 1 \\ 0 & -4 & 4 & -4\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & 1 & -1 & 1 \\ 0 & 0 & 0 & 0\end{array}\right)$$

The row is $0 = 0$. The matrix and augmented matrix both have rank 2, there are three unknowns, so one variable is free and there are infinitely many solutions: set $z = t$, obtain $y = t + 1$ and $x = 2 - y + z = 1$, giving $(1,\ t+1,\ t)$. Substitute into the third equation: $1 - 3(t+1) + 3t = -2$ ✓.

Answer. One unique solution for $a \notin \{2, -3\}$; no solutions for $a = 2$; infinitely many solutions for $a = -3$.

Notice the main point: two roots of the same determinant produced different outcomes. No test other than substitution distinguished them.

Algorithm
  1. Check whether the system is square. If not, go straight to ranks; there is no determinant.
  2. Calculate $\det A$ as a polynomial in the parameter and factor it; verify with one numerical substitution.
  3. All parameter values except the roots form one general case: the solution is unique, and you do not need to calculate it.
  4. Substitute each root one at a time and run Gaussian elimination: $0 = c$ means no solutions, $0 = 0$ means infinitely many.
  5. Enter exactly what was asked: a sum of qualifying values, their count, or a list. Never submit the sum of determinant roots without analyzing the roots.

Дополнительные материалы

Другие объяснения и материалы по теме. Используй их, если основного урока недостаточно.

видео3Blue1Brown · Linear transformations and matrices3Blue1Brown · Linear transformations and matrices EN
Матрица как преобразование пространства, а не таблица чисел. Ключевое видео для понимания темыA matrix as a transformation of space rather than a table of numbers. The key video for understanding the topic
видео3Blue1Brown · The determinant3Blue1Brown · The determinant EN
Почему определитель — это коэффициент растяжения площади, и почему ноль означает потерю информацииWhy the determinant is an area-scaling factor and why zero means information is lost
видео3Blue1Brown · Inverse matrices, column space and null space3Blue1Brown · Inverse matrices, column space and null space EN
Прямое продолжение: нулевой определитель означает не «решения нет», а потерю размерности — дальше вопрос решает ранг. Ровно сегодняшний разбор особых случаевA direct continuation: zero determinant does not mean “no solution,” but loss of dimension; rank decides the next question. Exactly today’s exceptional-case analysis
интерактивImmersive Linear Algebra · глава 8 «Rank»Immersive Linear Algebra · Chapter 8 “Rank” EN
Ранг с интерактивными картинками: видно, во что схлопывается пространство, когда строки зависимы. Глава 6 рядом — про сами матрицыRank with interactive diagrams: see what space collapses into when rows are dependent. Chapter 6 nearby covers matrices themselves
интерактивmatrixmultiplication.xyzmatrixmultiplication.xyz EN
Анимация умножения матриц: видно, откуда берётся каждое число результата. Тридцать секунд, чтобы больше не путать строки со столбцамиAn animation of matrix multiplication: see where each result number comes from. Thirty seconds to stop confusing rows with columns
текстGilbert Strang · MIT 18.06, конспектыGilbert Strang · MIT 18.06 lecture notes EN
Классический курс линейной алгебры. Первые пять лекций покрывают Гаусса и ранг лучше любого учебникаA classic linear-algebra course. The first five lectures cover Gaussian elimination and rank better than most textbooks
как работать сегодня
RU

Задачи дня выстроены в лестницу из четырёх ступеней, и идти по ним надо по порядку: каждая следующая ступень пользуется тем, что отработано на предыдущей.

Полный объём — 16 задач. Всё, что есть на странице, включая ступень ШАД. Это план на день, который идёт хорошо: десять минут дриля и полтора часа на сами задачи.

Минимум — 10 задач. b1002, b1003, b1004, b1005, b1006, b1007, y1001, y1002, y1003, y1004 — вся ступень 3, две техники ступени 2 и все четыре финала уровня YMLS. Счёт определителя $3\times3$ в минимум отдельной задачей не вынесен: b1001 остаётся в полном объёме, а тренируется этот навык десятью матрицами дриля ниже и внутри каждой задачи с параметром. Разминка w1001–w1004 в этот счёт не входит, но не выбрасывается: она устная, по полминуты на задачу, сразу после урока. Каждая из четырёх разминочных задач — простейшая версия одного из приёмов, на которых стоят финалы, включая w1004, где матрица Грама появляется в самом маленьком возможном размере.

Обязательные — 4 задачи. b1003, b1005, b1006, b1007 — это ровно вся ступень 3, и каждая из них мост. b1003 даёт корни определителя той самой матрицы, с которой начинается финал y1004, так что эти две задачи — буквально две половины одной. b1006 ведёт к y1004 со стороны Кронекера — Капелли: там определитель тоже обнуляется дважды, но один корень даёт бесконечно много решений, а другой — ни одного. b1007 — уменьшенная копия y1001: та же матрица Грама, то же квадратное уравнение, то же условие, отсекающее лишний корень. b1005 ведёт к задаче ШАД s1001, а перед ним, на ступени 2, стоит b1002 — та же пара фактов о ранге на других размерах. Повтор намеренный: связка «равенство $\rank(A^{T}A) = \rank A$ плюс оценка $\rank(AB) \le \min$, достижимость которой показывается явной парой матриц» проходится дважды, и на ступени 3 она должна идти уже без раздумий. Если день сорвался и осталось сорок минут — делаются эти четыре и мини-тест, остальное переносится.

Дриль на определители. Первые десять минут слота «Задачи». Выпиши десять случайных матриц $3\times3$ с однозначными элементами и посчитай каждый определитель дважды: разложением по первой строке и разложением по столбцу с наибольшим числом нулей. Цель — 90 секунд на матрицу и полное совпадение обоих путей. Скорость здесь важнее, чем кажется: в задачах с параметром определитель — промежуточный шаг, а не ответ.

Формат ответа в задачах с параметром

Онлайн-этап принимает число, поэтому вопрос «при каких $a$» приходит как «найдите сумму всех таких $a$». Прочитай, какая именно сумма нужна: значений без решений, значений с бесконечным множеством решений или всех вырожденных значений сразу. Сумма корней определителя и сумма значений, при которых система несовместна, — разные числа, и подмена одного другим стоит всей задачи.

Проверять себя после решения можно кодом — на самом экзамене его не будет, но при подготовке он ловит арифметику мгновенно:

import sympy as sp

a = sp.Symbol('a')
A = sp.Matrix([[1, 1, -1], [2, 3, a], [1, a, 3]])
print(sp.factor(A.det()))

Он печатает -(a - 2)*(a + 3) — те же множители, что в эталонной задаче. Пользуйся этим как проверкой уже полученного ответа, а не как способом его получить: разбор случаев после корней определителя всё равно придётся делать головой.

EN

Today’s problems form a four-level staircase, and you should take them in order: each level uses what you practiced in the previous one; the order is deliberate. This order is deliberate.

Full workload — 16 problems. Everything on the page, including the SHAD level. This is a plan for a good day: ten minutes for the drill and an hour and a half for the problems. It leaves time for a final check.

Minimum — 10 problems. b1002, b1003, b1004, b1005, b1006, b1007, y1001, y1002, y1003, y1004 — all of Level 3, two Level 2 techniques, and all four YMLS-level finals. The $3\times3$ determinant is not a separate minimum problem: b1001 remains in the full workload, while the skill is trained with the ten drill matrices below and inside every parameterized problem. The warm-up w1001–w1004 is not counted, but do not skip it: it is oral, about thirty seconds per problem, immediately after the lesson. Each warm-up problem is the simplest version of a technique behind a final, including w1004, where the Gram matrix appears at its smallest possible size.

Mandatory — 4 problems. b1003, b1005, b1006, b1007 — exactly all of Level 3, and each is a bridge. b1003 gives the determinant roots of the very matrix with which final y1004 starts, so these two problems are literally two halves of one. b1006 leads to y1004 from the Rouché–Capelli side: the determinant also vanishes twice there, but one root gives infinitely many solutions and the other none. b1007 is a reduced copy of y1001: the same Gram matrix, the same quadratic equation, and the same condition that rules out the extra root. b1005 leads to SHAD problem s1001; before it, at Level 2, b1002 presents the same pair of rank facts at other sizes. The repetition is deliberate: it is meant to make the method automatic: the chain “$\rank(A^{T}A) = \rank A$ plus $\rank(AB) \le \min$, with attainability shown by an explicit pair of matrices” is covered twice, and at Level 3 it should require no thought. If the day goes badly and only forty minutes remain, do these four and the mini-test; carry the rest forward.

Determinant drill. The first ten minutes of the Problems slot. Write ten random $3\times3$ matrices with unambiguous entries and calculate each determinant twice: expand along the first row and along the column with the most zeros. The goal is 90 seconds per matrix and complete agreement between both routes. Speed matters more than it seems: in parameterized problems, the determinant is an intermediate step, not the answer.

Answer format for parameterized problems

The online round accepts a number, so “for which $a$?” appears as “find the sum of all such values.” Read which sum is requested: values with no solutions, values with infinitely many solutions, or all singular values together. The sum of determinant roots and the sum of values making the system inconsistent are different numbers, and substituting one for the other costs the entire problem.

You can check yourself with code after solving — it will not be available in the exam, but it catches arithmetic instantly during preparation:

import sympy as sp

a = sp.Symbol('a')
A = sp.Matrix([[1, 1, -1], [2, 3, a], [1, a, 3]])
print(sp.factor(A.det()))

It prints -(a - 2)*(a + 3), the same factors as in the model problem. Use it to check an answer you have already obtained, not as a way to obtain it: the case analysis after the determinant roots still has to be done in your head.

16
полный объём
10
минимум
4
обязательные

Полный объём — все задачи ниже. Минимум — если день сорвался и часа осталось два. Обязательные — мосты к финальной задаче, они не пропускаются никогда.

Разминка

решено 4 из 4

Устно, за полминуты. Проверяет, что определение понято, а не выучено.

W1001Разминкаступень 1Линал✓разминка
RU

Вычислите $\det\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$.

EN

Evaluate $\det\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$.

верно
Подсказка / Hint
RU

$ad - bc$.

EN

Use $ad - bc$.

Решение / Solution
RU$$1 \cdot 4 - 2 \cdot 3 = 4 - 6 = -2$$

Определитель не равен нулю, значит строки $(1,2)$ и $(3,4)$ линейно независимы, а система с такой матрицей имеет ровно одно решение при любой правой части.

EN$$1 \cdot 4 - 2 \cdot 3 = 4 - 6 = -2$$

The determinant is nonzero, so the rows $(1,2)$ and $(3,4)$ are linearly independent, and a system with this coefficient matrix has exactly one solution for every right-hand side.

уверенность1 — угадал, 5 — уверен полностью
W1002Разминкаступень 1Линал✓разминка
RU

Вычислите $\det\begin{pmatrix} 2 & 4 \\ 3 & 6 \end{pmatrix}$.

EN

Evaluate $\det\begin{pmatrix} 2 & 4 \\ 3 & 6 \end{pmatrix}$.

верно
Подсказка / Hint
RU

Посмотри на строки внимательно, прежде чем считать.

EN

Inspect the rows carefully before doing any calculations.

Решение / Solution
RU$$2 \cdot 6 - 4 \cdot 3 = 12 - 12 = 0$$

Ноль не случаен: вторая строка равна первой, умноженной на $1.5$ — строки линейно зависимы. У такой матрицы определитель нулевой всегда, и это видно до всяких вычислений.

Что это значит для системы: $\rank A = 1$, а не 2, поэтому единственного решения нет. В зависимости от правой части решений либо бесконечно много, либо ни одного — какой именно случай, определитель уже не различает, это решается подстановкой.

EN$$2 \cdot 6 - 4 \cdot 3 = 12 - 12 = 0$$

The zero is not accidental: the second row is $1.5$ times the first, so the rows are linearly dependent. Such a matrix always has zero determinant, which can be seen without calculation.

For the corresponding system, this means that $\rank A = 1$ rather than 2, so there is no unique solution. Depending on the right-hand side, the system has either infinitely many solutions or no solution. The determinant alone cannot distinguish these cases; substitution can.

уверенность1 — угадал, 5 — уверен полностью
W1003Разминкаступень 1Линал✓разминка
RU

Решите систему и укажите значение $x$:

$$\begin{cases} x + y = 5 \\ x - y = 1 \end{cases}$$
EN

Solve the system and give the value of $x$:

$$\begin{cases} x + y = 5 \\ x - y = 1 \end{cases}$$
верно
Подсказка / Hint
RU

Прибавь к первому уравнению второе — это и есть элементарное преобразование Гаусса.

EN

Add the second equation to the first. This is an elementary Gaussian-elimination operation.

Решение / Solution
RU

Складываем строки (третье из разрешённых действий, с множителем 1): $2x = 6$, откуда $x = 3$. Обратный ход: $3 + y = 5$, то есть $y = 2$.

Проверка: $3 + 2 = 5$ ✓, $3 - 2 = 1$ ✓.

Ступенчатый вид здесь достигается за один шаг, ведущие элементы есть в обоих столбцах, $\rank A = \rank[A \mid \mathbf{b}] = 2$ — ровно число неизвестных, поэтому решение единственно.

EN

Add the rows, using the third allowed row operation with multiplier 1: $2x = 6$, hence $x = 3$. Back-substitution gives $3 + y = 5$, so $y = 2$.

Check: $3 + 2 = 5$ ✓ and $3 - 2 = 1$ ✓.

Row-echelon form is reached in one step. Both columns contain pivots, and $\rank A = \rank[A \mid \mathbf{b}] = 2$, equal to the number of unknowns, so the solution is unique.

уверенность1 — угадал, 5 — уверен полностью
W1004Разминкаступень 1Линал✓разминка
RU

Векторы $u$ и $v$ удовлетворяют условиям $\|u\| = 2$, $\|v\| = 3$, $\langle u, v\rangle = 4$. Составьте матрицу Грама

$G = \begin{pmatrix} \langle u,u\rangle & \langle u,v\rangle \\ \langle v,u\rangle & \langle v,v\rangle \end{pmatrix}$

и вычислите её определитель.

EN

Vectors $u$ and $v$ satisfy $\|u\| = 2$, $\|v\| = 3$, and $\langle u, v\rangle = 4$. Form their Gram matrix

$G = \begin{pmatrix} \langle u,u\rangle & \langle u,v\rangle \\ \langle v,u\rangle & \langle v,v\rangle \end{pmatrix}$

and calculate its determinant.

верно
Подсказка / Hint
RU

На диагонали матрицы Грама стоят не длины, а их квадраты.

EN

The diagonal entries of a Gram matrix are squared norms, not norms.

Решение / Solution
RU

Диагональ — это $\langle u,u\rangle = \|u\|^2 = 4$ и $\langle v,v\rangle = \|v\|^2 = 9$; вне диагонали стоит одно и то же число 4, потому что скалярное произведение симметрично.

$$G = \begin{pmatrix} 4 & 4 \\ 4 & 9\end{pmatrix}, \qquad \det G = 4\cdot9 - 4\cdot4 = 36 - 16 = 20$$
Что означает это число

$\det G = \|u\|^2\|v\|^2 - \langle u,v\rangle^2$ — это квадрат площади параллелограмма на $u$ и $v$. Здесь $\cos\varphi = 4/6 = 2/3$, площадь равна $2\cdot3\cdot\sqrt{1 - 4/9} = 6\cdot\frac{\sqrt5}{3} = 2\sqrt5$, и её квадрат действительно равен 20.

Положительность определителя означает, что векторы независимы. Ноль означал бы коллинеарность — тот самый случай равенства в неравенстве Коши — Буняковского.

EN

The diagonal entries are $\langle u,u\rangle = \|u\|^2 = 4$ and $\langle v,v\rangle = \|v\|^2 = 9$. Both off-diagonal entries are 4 because the inner product is symmetric.

$$G = \begin{pmatrix} 4 & 4 \\ 4 & 9\end{pmatrix}, \qquad \det G = 4\cdot9 - 4\cdot4 = 36 - 16 = 20$$
What this number means

$\det G = \|u\|^2\|v\|^2 - \langle u,v\rangle^2$ is the square of the area of the parallelogram spanned by $u$ and $v$. Here $\cos\varphi = 4/6 = 2/3$, so the area is $2\cdot3\cdot\sqrt{1 - 4/9} = 6\cdot\frac{\sqrt5}{3} = 2\sqrt5$, whose square is indeed 20.

A positive determinant means that the vectors are independent. A zero determinant would mean collinearity, which is precisely the equality case of the Cauchy–Schwarz inequality.

уверенность1 — угадал, 5 — уверен полностью

База

решено 7 из 7

Чистая техника без сюрпризов. Здесь нарабатывается автоматизм.

B1001Базаступень 2Линал✓авторская
RU

Вычислите $\det\begin{pmatrix} 2 & 1 & 3 \\ 0 & 4 & 1 \\ 5 & 2 & 6 \end{pmatrix}$.

EN

Evaluate $\det\begin{pmatrix} 2 & 1 & 3 \\ 0 & 4 & 1 \\ 5 & 2 & 6 \end{pmatrix}$.

верно
Подсказка / Hint
RU

Раскладывай по той строке или столбцу, где есть ноль.

EN

Expand along a row or column containing a zero.

Решение / Solution
RU

В первом столбце есть ноль — раскладываем по нему. Знаки чередуются $+,\ -,\ +$:

$$\det = 2\begin{vmatrix} 4 & 1 \\ 2 & 6\end{vmatrix} - 0 \cdot (\ldots) + 5\begin{vmatrix} 1 & 3 \\ 4 & 1\end{vmatrix}$$$$= 2(24 - 2) + 5(1 - 12) = 44 - 55 = -11$$

Проверка вторым разложением, по первой строке:

$$2(4\cdot6 - 1\cdot2) - 1(0\cdot6 - 1\cdot5) + 3(0\cdot2 - 4\cdot5) = 2\cdot22 + 5 - 60 = 44 - 55 = -11$$

Два независимых пути дали одно число.

Так и надо считать каждый определитель

Проверка вторым разложением стоит тридцать секунд и ловит знаковую ошибку — а ошибка в знаке минора не выдаёт себя ничем, ответ просто получается другим. Это единственная защита в теме, где нет ни оценок «примерно столько», ни проверки подстановкой.

EN

The first column contains a zero, so expand along it. The signs alternate $+,\ -,\ +$:

$$\det = 2\begin{vmatrix} 4 & 1 \\ 2 & 6\end{vmatrix} - 0 \cdot (\ldots) + 5\begin{vmatrix} 1 & 3 \\ 4 & 1\end{vmatrix}$$$$= 2(24 - 2) + 5(1 - 12) = 44 - 55 = -11$$

Check by a second expansion, along the first row:

$$2(4\cdot6 - 1\cdot2) - 1(0\cdot6 - 1\cdot5) + 3(0\cdot2 - 4\cdot5) = 2\cdot22 + 5 - 60 = 44 - 55 = -11$$

Two independent methods give the same result.

This is how to evaluate every determinant

A second expansion takes thirty seconds and catches a sign error. A wrong cofactor sign gives no warning; it merely produces a different answer. This is the only reliable safeguard in a topic where neither a rough magnitude estimate nor substitution is available.

уверенность1 — угадал, 5 — уверен полностью
B1002Базаступень 2минимумЛинал✓авторская
RU

Вещественная матрица $A$ имеет размер $4 \times 7$ и ранг 3, вещественная матрица $B$ — размер $7 \times 5$ и ранг 2. Чему равен $\rank(A^{T}A)$ и каково наибольшее возможное значение $\rank(AB)$? В ответ запишите сумму этих двух чисел.

EN

Let $A$ be a real $4 \times 7$ matrix of rank 3, and let $B$ be a real $7 \times 5$ matrix of rank 2. Find $\rank(A^{T}A)$ and the largest possible value of $\rank(AB)$. Enter the sum of these two numbers.

верно
Подсказка / Hint
RU

Считать здесь нечего: оба числа закрываются двумя фактами о ранге из урока. Только один из этих фактов — равенство, а другой — оценка сверху.

EN

There is nothing to compute: two rank facts from the lesson determine both numbers. One of them is an equality; the other is only an upper bound.

Решение / Solution
RU

Первое число — равенство, а не оценка. Для любой вещественной матрицы $\rank(A^{T}A) = \rank A$, поэтому $\rank(A^{T}A) = 3$ независимо ни от чего. Размер $7 \times 7$ у произведения $A^{T}A$ здесь не подсказка, а помеха: он ограничивает ранг числом 7, а настоящее ограничение приходит от самой $A$ и куда жёстче.

Второе число — оценка сверху. $\rank(AB) \le \min(\rank A, \rank B) = \min(3, 2) = 2$. Двойка достигается, и это надо показать, а не предположить. Возьмём $A$, у которой первые три строки — это $e_1$, $e_2$, $e_3$ пространства $\mathbb{R}^{7}$, а четвёртая нулевая, и $B$, у которой первые две строки — $e_1$, $e_2$ пространства $\mathbb{R}^{5}$, а остальные пять нулевые. Ранги равны 3 и 2, как требуется. Строки произведения $AB$ — это комбинации строк $B$ с коэффициентами из строк $A$, поэтому первая строка $AB$ равна $e_1$, вторая равна $e_2$, а две оставшиеся нулевые: $\rank(AB) = 2$.

$$3 + 2 = 5$$
То же тождество с другой стороны

Применим $\rank(A^{T}A) = \rank A$ не к $A$, а к $A^{T}$: получится $\rank(AA^{T}) = \rank A^{T} = \rank A = 3$. То есть у прямоугольной $A$ есть два квадратных спутника, $4\times4$ и $7\times7$, и ранг у обоих один и тот же. Ровно на этом наблюдении стоит задача ШАД s1001: там оба спутника оказываются невырожденными, а значит их ранги равны их размерам — и два разных размера обязаны совпасть.

EN

The first number follows from an equality, not a bound. For every real matrix, $\rank(A^{T}A) = \rank A$, so $\rank(A^{T}A) = 3$ in every case. The $7 \times 7$ size of $A^{T}A$ is a distraction: it bounds the rank by 7, while the matrix $A$ gives the much tighter bound.

The second number has an upper bound. $\rank(AB) \le \min(\rank A, \rank B) = \min(3, 2) = 2$. We must show that 2 is attainable rather than merely assume it. Take $A$ whose first three rows are $e_1$, $e_2$, and $e_3$ in $\mathbb{R}^{7}$ and whose fourth row is zero. Take $B$ whose first two rows are $e_1$ and $e_2$ in $\mathbb{R}^{5}$ and whose remaining five rows are zero. Their ranks are 3 and 2, as required. The rows of $AB$ are linear combinations of the rows of $B$ with coefficients from the rows of $A$. Thus the first row of $AB$ is $e_1$, the second is $e_2$, and the other two are zero, so $\rank(AB) = 2$.

$$3 + 2 = 5$$
The same identity from the other side

Apply $\rank(A^{T}A) = \rank A$ to $A^{T}$ instead of $A$. This gives $\rank(AA^{T}) = \rank A^{T} = \rank A = 3$. Thus a rectangular matrix $A$ has two square companions, of sizes $4\times4$ and $7\times7$, and both have the same rank. Problem s1001 rests precisely on this observation: there both companions are nonsingular, so their ranks equal their sizes, forcing the two different sizes to be equal.

уверенность1 — угадал, 5 — уверен полностью
B1003Базаступень 3обязательнаяЛинал✓авторская
RU

Найдите сумму всех различных значений параметра $a$, при которых матрица

$\begin{pmatrix} a & 1 & 1 \\ 1 & a & 1 \\ 1 & 1 & a \end{pmatrix}$

вырождена, то есть её определитель равен нулю. (Каждое подходящее значение учитывается один раз, кратность корня роли не играет.)

EN

Find the sum of all distinct values of the parameter $a$ for which the matrix

$\begin{pmatrix} a & 1 & 1 \\ 1 & a & 1 \\ 1 & 1 & a \end{pmatrix}$

is singular, that is, has determinant zero. Count each valid value once, regardless of its multiplicity as a root.

верно
Подсказка / Hint
RU

Прибавь вторую и третью строки к первой — увидишь общий множитель.

EN

Add the second and third rows to the first row; a common factor will appear.

Решение / Solution
RU

Прибавим к первой строке вторую и третью. Такое действие определитель не меняет, а в первой строке все элементы становятся равны $a + 2$, и этот множитель выносится:

$$\det = (a+2)\begin{vmatrix} 1 & 1 & 1 \\ 1 & a & 1 \\ 1 & 1 & a\end{vmatrix}$$

В оставшемся определителе вычтем первую строку из второй и из третьей:

$$\begin{vmatrix} 1 & 1 & 1 \\ 0 & a-1 & 0 \\ 0 & 0 & a-1\end{vmatrix} = (a-1)^2$$

Итого

$$\det = (a + 2)(a - 1)^2$$

Вырожденность при $a = -2$ и при $a = 1$. Сумма всех таких значений: $-2 + 1 = -1$.

Разная кратность — разное падение ранга

При $a = 1$ все три строки одинаковы, ранг падает сразу до 1. При $a = -2$ ранг падает до 2.

Это не украшение, а рабочий факт: в задаче y1004 стоит система ровно с этой матрицей, и два найденных здесь корня ведут себя там по-разному — один даёт бесконечно много решений, другой не даёт ни одного. Определитель их не различает; различает только подстановка.

EN

Add the second and third rows to the first. This operation does not change the determinant. Every entry in the first row becomes $a + 2$, so factor it out:

$$\det = (a+2)\begin{vmatrix} 1 & 1 & 1 \\ 1 & a & 1 \\ 1 & 1 & a\end{vmatrix}$$

In the remaining determinant, subtract the first row from both the second and the third:

$$\begin{vmatrix} 1 & 1 & 1 \\ 0 & a-1 & 0 \\ 0 & 0 & a-1\end{vmatrix} = (a-1)^2$$

Therefore,

$$\det = (a + 2)(a - 1)^2$$

The matrix is singular for $a = -2$ and $a = 1$. Their sum is $-2 + 1 = -1$.

Different multiplicities, different rank drops

For $a = 1$, all three rows coincide, so the rank drops all the way to 1. For $a = -2$, the rank drops to 2.

This is not a decorative observation. Problem y1004 uses a system with exactly this matrix, and the two roots found here behave differently there: one gives infinitely many solutions, while the other gives no solution. The determinant cannot distinguish them; substitution can.

уверенность1 — угадал, 5 — уверен полностью
B1004Базаступень 2минимумЛинал✓авторская
RU

Найдите сумму всех значений параметра $a$, при которых система

$$\begin{cases} ax + 2y = 3 \\ 8x + ay = 6 \end{cases}$$

не имеет ни одного решения. (Если такое значение единственно, суммой считается оно само.)

EN

Find the sum of all values of the parameter $a$ for which the system

$$\begin{cases} ax + 2y = 3 \\ 8x + ay = 6 \end{cases}$$

has no solution. If there is only one such value, that value itself is the required sum.

верно
Подсказка / Hint
RU

Сначала определитель: он назовёт всех подозреваемых. Дальше каждого подозреваемого придётся проверить подстановкой — определитель не различает «решений нет» и «решений бесконечно много».

EN

First use the determinant to identify all candidates. Then check each candidate by substitution: the determinant does not distinguish “no solutions” from “infinitely many solutions.”

Решение / Solution
RU

Шаг 1. Определитель.

$$\det\begin{pmatrix} a & 2 \\ 8 & a\end{pmatrix} = a^2 - 16 = (a-4)(a+4)$$

При $a \ne \pm4$ определитель не равен нулю, решение существует и единственно. Подозреваемых двое: $a = 4$ и $a = -4$.

Шаг 2. Случай $a = 4$. Система становится

$$\begin{cases} 4x + 2y = 3 \\ 8x + 4y = 6 \end{cases}$$

Второе уравнение — это первое, умноженное на 2. После вычитания удвоенной первой строки из второй получается $0 = 0$: одно полезное уравнение на две неизвестные, решений бесконечно много. Значение не подходит.

Шаг 3. Случай $a = -4$. Система становится

$$\begin{cases} -4x + 2y = 3 \\ 8x - 4y = 6 \end{cases}$$

Умножим первое уравнение на $-2$: получится $8x - 4y = -6$. Сравнивая со вторым, получаем $0 = 12$, то есть $\rank A = 1$, а $\rank[A\mid\mathbf{b}] = 2$. Решений нет. Значение подходит.

Ответ: подходит только $a = -4$, сумма равна $-4$.

Почему нельзя было сдать сумму корней определителя

Сумма корней $a^2 - 16$ равна нулю, а правильный ответ $-4$. Разница целиком в третьем шаге: из двух вырожденных значений одно даёт бесконечное множество решений, и в ответ оно не входит.

EN

Step 1. Determinant.

$$\det\begin{pmatrix} a & 2 \\ 8 & a\end{pmatrix} = a^2 - 16 = (a-4)(a+4)$$

For $a \ne \pm4$, the determinant is nonzero, so the solution exists and is unique. There are two candidates: $a = 4$ and $a = -4$.

Step 2. The case $a = 4$. The system becomes

$$\begin{cases} 4x + 2y = 3 \\ 8x + 4y = 6 \end{cases}$$

The second equation is twice the first. Subtracting twice the first row from the second gives $0 = 0$: there is one effective equation in two unknowns, so there are infinitely many solutions. This value is not valid.

Step 3. The case $a = -4$. The system becomes

$$\begin{cases} -4x + 2y = 3 \\ 8x - 4y = 6 \end{cases}$$

Multiplying the first equation by $-2$ gives $8x - 4y = -6$. Comparing this with the second equation gives $0 = 12$, so $\rank A = 1$ whereas $\rank[A\mid\mathbf{b}] = 2$. There is no solution, so this value is valid.

Answer: only $a = -4$ is valid, and the required sum is $-4$.

Why the sum of the determinant's roots is not the answer

The roots of $a^2 - 16$ sum to zero, but the correct answer is $-4$. The entire difference lies in Step 3: one of the two singular values gives infinitely many solutions and must not be included.

уверенность1 — угадал, 5 — уверен полностью
B1005Базаступень 3обязательнаяЛинал✓авторская
RU

Вещественная матрица $A$ имеет размер $3 \times 5$ и ранг 2, вещественная матрица $B$ — размер $5 \times 4$ и ранг 3. Найдите наибольшее возможное значение суммы $\rank(AB) + \rank(A^{T}A)$.

EN

Let $A$ be a real $3 \times 5$ matrix of rank 2, and let $B$ be a real $5 \times 4$ matrix of rank 3. Find the largest possible value of $\rank(AB) + \rank(A^{T}A)$.

верно
Подсказка / Hint
RU

Одно из двух слагаемых вообще не зависит от выбора матриц.

EN

One of the two terms does not depend on the choice of the matrices at all.

Решение / Solution
RU

Второе слагаемое даже не варьируется. Для любой вещественной матрицы $\rank(A^{T}A) = \rank A$, поэтому $\rank(A^{T}A) = 2$ всегда, при любых $A$ и $B$ с указанными свойствами. Размер 5×5 у произведения $A^{T}A$ здесь ни на что не влияет.

Первое слагаемое ограничено сверху. $\rank(AB) \le \min(\rank A, \rank B) = \min(2,3) = 2$.

Значит сумма не превосходит $2 + 2 = 4$. Осталось убедиться, что четвёрка достигается — неравенство само по себе не гарантирует, что граница берётся. Возьмём

$$A = \begin{pmatrix} 1&0&0&0&0 \\ 0&1&0&0&0 \\ 0&0&0&0&0 \end{pmatrix}, \qquad B = \begin{pmatrix} 1&0&0&0 \\ 0&1&0&0 \\ 0&0&1&0 \\ 0&0&0&0 \\ 0&0&0&0 \end{pmatrix}$$

Ранги равны 2 и 3, как требуется, а произведение $AB$ имеет ненулевые строки $(1,0,0,0)$ и $(0,1,0,0)$, то есть ранг 2.

Ответ: 4.

Типичная ошибка

Написать $\rank(A^{T}A) \le \min(5, \rank A^{T}, \rank A)$ и остановиться на неравенстве. Здесь работает не неравенство, а равенство: $A$ и $A^{T}A$ имеют одно и то же множество решений однородной системы, потому что из $A^{T}A\mathbf{x} = 0$ следует $\|A\mathbf{x}\|^2 = 0$. Ровно это тождество закрывает задачу s1001 и лежит под методом наименьших квадратов.

EN

The second term does not vary. For every real matrix, $\rank(A^{T}A) = \rank A$. Therefore $\rank(A^{T}A) = 2$ for every $A$ and $B$ satisfying the stated conditions. The $5\times5$ size of $A^{T}A$ is irrelevant here.

The first term has an upper bound. $\rank(AB) \le \min(\rank A, \rank B) = \min(2,3) = 2$.

Thus the sum is at most $2 + 2 = 4$. It remains to show that 4 is attainable; the inequality alone does not guarantee that the bound is achieved. Take

$$A = \begin{pmatrix} 1&0&0&0&0 \\ 0&1&0&0&0 \\ 0&0&0&0&0 \end{pmatrix}, \qquad B = \begin{pmatrix} 1&0&0&0 \\ 0&1&0&0 \\ 0&0&1&0 \\ 0&0&0&0 \\ 0&0&0&0 \end{pmatrix}$$

Their ranks are 2 and 3, as required, while $AB$ has nonzero rows $(1,0,0,0)$ and $(0,1,0,0)$, so its rank is 2.

Answer: 4.

A common mistake

One may write $\rank(A^{T}A) \le \min(5, \rank A^{T}, \rank A)$ and stop at the inequality. Here we have an equality, not merely a bound: $A$ and $A^{T}A$ have the same null space because $A^{T}A\mathbf{x} = 0$ implies $\|A\mathbf{x}\|^2 = 0$. This is exactly the identity that solves problem s1001 and underlies the method of least squares.

уверенность1 — угадал, 5 — уверен полностью
B1006Базаступень 3обязательнаяЛинал✓авторская
RU

Найдите сумму всех значений параметра $a$, при которых система

$$\begin{cases} x + y + z = 1 \\ 2x + 3y + az = 3 \\ x + ay + 3z = 3 \end{cases}$$

имеет бесконечно много решений. (Если такое значение единственно, суммой считается оно само.)

EN

Find the sum of all values of the parameter $a$ for which the system

$$\begin{cases} x + y + z = 1 \\ 2x + 3y + az = 3 \\ x + ay + 3z = 3 \end{cases}$$

has infinitely many solutions. If there is only one such value, that value itself is the required sum.

верно
Подсказка / Hint
RU

Корней у определителя два, и ведут они себя по-разному. Для каждого сравни ранг матрицы системы с рангом расширенной матрицы.

EN

The determinant has two roots, and they behave differently. For each root, compare the rank of the coefficient matrix with the rank of the augmented matrix.

Решение / Solution
RU

Шаг 1. Определитель. Раскладываем по первой строке:

$$\det\begin{pmatrix} 1 & 1 & 1 \\ 2 & 3 & a \\ 1 & a & 3\end{pmatrix} = (9 - a^2) - (6 - a) + (2a - 3) = -a^2 + 3a = -a(a - 3)$$

Проверка подстановкой $a = 1$: исходный определитель равен $1(9-1) - 1(6-1) + 1(2-3) = 8 - 5 - 1 = 2$, и формула даёт $-1\cdot(-2) = 2$ ✓.

При $a \ne 0$ и $a \ne 3$ решение единственно. Разбираем два корня.

Шаг 2. Случай $a = 0$.

$$\left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 2 & 3 & 0 & 3 \\ 1 & 0 & 3 & 3\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 0 & 1 & -2 & 1 \\ 0 & -1 & 2 & 2\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 0 & 1 & -2 & 1 \\ 0 & 0 & 0 & 3\end{array}\right)$$

Последняя строка означает $0 = 3$: $\rank A = 2$, а $\rank[A\mid\mathbf{b}] = 3$. Решений нет, значение не подходит.

Шаг 3. Случай $a = 3$.

$$\left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 2 & 3 & 3 & 3 \\ 1 & 3 & 3 & 3\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 \\ 0 & 2 & 2 & 2\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0\end{array}\right)$$

Строка $0 = 0$: оба ранга равны 2, неизвестных три, свободных переменных $3 - 2 = 1$. Решений бесконечно много — они образуют прямую $(x, y, z) = (0,\ 1 - t,\ t)$. Значение подходит.

Ответ: подходит только $a = 3$, сумма равна 3.

Что здесь тренируется

Определитель обнулился дважды, а исходы получились разные. Никакого признака, позволяющего сказать заранее, какой корень «пустой», а какой «бесконечный», не существует: оба раза нужен Гаусс с числами. В финале y1004 вопрос задан про другой исход, и если разбор не сделан, ответ будет взят не тот.

Сравни матрицу коэффициентов с эталонной из урока: она отличается ровно одним элементом — в первой строке $-z$ заменено на $+z$. Определитель при этом меняется целиком, с $6 - a - a^{2}$ на $3a - a^{2}$, и корни вместо $2$ и $-3$ становятся $0$ и $3$. Отсюда правило: определитель с параметром пересчитывается заново при любой правке условия, даже если матрица «та же самая».

EN

Step 1. Determinant. Expand along the first row:

$$\det\begin{pmatrix} 1 & 1 & 1 \\ 2 & 3 & a \\ 1 & a & 3\end{pmatrix} = (9 - a^2) - (6 - a) + (2a - 3) = -a^2 + 3a = -a(a - 3)$$

Check by substituting $a = 1$: the original determinant is $1(9-1) - 1(6-1) + 1(2-3) = 8 - 5 - 1 = 2$, while the formula gives $-1\cdot(-2) = 2$ ✓.

For $a \ne 0$ and $a \ne 3$, the solution is unique. Consider the two roots separately.

Step 2. The case $a = 0$.

$$\left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 2 & 3 & 0 & 3 \\ 1 & 0 & 3 & 3\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 0 & 1 & -2 & 1 \\ 0 & -1 & 2 & 2\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 0 & 1 & -2 & 1 \\ 0 & 0 & 0 & 3\end{array}\right)$$

The last row states $0 = 3$: $\rank A = 2$ whereas $\rank[A\mid\mathbf{b}] = 3$. There is no solution, so this value is not valid.

Step 3. The case $a = 3$.

$$\left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 2 & 3 & 3 & 3 \\ 1 & 3 & 3 & 3\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 \\ 0 & 2 & 2 & 2\end{array}\right) \to \left(\begin{array}{ccc|c} 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0\end{array}\right)$$

The last row states $0 = 0$. Both ranks equal 2, there are three unknowns, and there is $3 - 2 = 1$ free variable. Thus there are infinitely many solutions, forming the line $(x, y, z) = (0,\ 1 - t,\ t)$. This value is valid.

Answer: only $a = 3$ is valid, so the sum is 3.

What this problem tests

The determinant vanishes for two parameter values, but the outcomes differ. There is no shortcut that reveals in advance which root gives no solution and which gives infinitely many; numerical Gaussian elimination must be carried out in both cases. Problem y1004 asks about the other outcome, and without carrying out the analysis it is easy to choose the wrong root.

Compare this coefficient matrix with the model example from the lesson. It differs in exactly one entry: $-z$ in the first row has become $+z$. The determinant changes completely, from $6 - a - a^{2}$ to $3a - a^{2}$, and the roots change from $2,-3$ to $0,3$. Therefore, a determinant involving a parameter must be recomputed after any change to the problem, even if the matrix looks “almost the same.”

уверенность1 — угадал, 5 — уверен полностью
B1007Базаступень 3обязательнаяЛинал✓авторская
RU

В $\mathbb{R}^{2}$ даны векторы $u$, $v$, $w$, для которых $\|u\| = 1$, $\|v\| = \|w\| = 2$ и $\langle u, v\rangle = \langle u, w\rangle = 1$. Известно, что $v \ne w$. Найдите $\langle v, w\rangle$.

EN

Vectors $u$, $v$, and $w$ in $\mathbb{R}^{2}$ satisfy $\|u\| = 1$, $\|v\| = \|w\| = 2$, and $\langle u, v\rangle = \langle u, w\rangle = 1$. It is known that $v \ne w$. Find $\langle v, w\rangle$.

верно
Подсказка / Hint
RU

Три вектора на плоскости линейно зависимы всегда — это можно не доказывать, а сразу использовать. Обозначь неизвестное буквой и поставь его в две клетки таблицы попарных произведений.

EN

Any three vectors in the plane are linearly dependent, so use this immediately. Introduce a variable for the unknown inner product and place it in the two corresponding entries of the Gram matrix.

Решение / Solution
RU

Все три вектора лежат в $\mathbb{R}^2$, а любые три вектора на плоскости линейно зависимы. Значит определитель их матрицы Грама равен нулю — это условие даётся задачей бесплатно.

Обозначим $X = \langle v, w\rangle$. На диагонали Грама стоят квадраты длин:

$$G = \begin{pmatrix} 1 & 1 & 1 \\ 1 & 4 & X \\ 1 & X & 4 \end{pmatrix}$$

Раскладываем по первой строке:

$$\det G = (16 - X^2) - (4 - X) + (X - 4) = -X^2 + 2X + 8$$

Приравниваем нулю: $X^2 - 2X - 8 = 0$, откуда $X = 4$ или $X = -2$.

Выбор корня. При $X = 4$ получается $|\langle v,w\rangle| = 4 = \|v\|\,\|w\|$ — равенство в неравенстве Коши — Буняковского, значит $v$ и $w$ коллинеарны; длины у них одинаковы, а произведение положительно, поэтому $v = w$. Условие задачи это запрещает.

Остаётся $X = -2$.

Проверка координатами. Возьмём $u = (1, 0)$. Тогда из $\langle u,v\rangle = 1$ следует $v_1 = 1$, а из $\|v\| = 2$ — что $v_2 = \pm\sqrt3$; то же самое для $w$. Условие $v \ne w$ означает противоположные знаки, и тогда

$$\langle v, w\rangle = 1\cdot1 + \sqrt3 \cdot (-\sqrt3) = 1 - 3 = -2$$

Совпало с корнем, найденным через определитель.

Ответ: $-2$.

Это уменьшенная копия финала

В задаче y1001 устройство ровно то же: неизвестное произведение ставится в две клетки Грама, определитель приравнивается нулю, квадратное уравнение даёт два корня, и лишний отсекается дополнительным условием текста. Здесь условие называется «$v \ne w$», там — «$v$ и $w$ по одну сторону от прямой». Если этот механизм понятен тут, финал отличается только арифметикой.

EN

All three vectors lie in $\mathbb{R}^2$, and any three vectors in the plane are linearly dependent. Therefore the determinant of their Gram matrix is zero; the problem gives this condition for free.

Let $X = \langle v, w\rangle$. The diagonal entries of the Gram matrix are the squared norms:

$$G = \begin{pmatrix} 1 & 1 & 1 \\ 1 & 4 & X \\ 1 & X & 4 \end{pmatrix}$$

Expand along the first row:

$$\det G = (16 - X^2) - (4 - X) + (X - 4) = -X^2 + 2X + 8$$

Setting this equal to zero gives $X^2 - 2X - 8 = 0$, so $X = 4$ or $X = -2$.

Choose the root. If $X = 4$, then $|\langle v,w\rangle| = 4 = \|v\|\,\|w\|$. Equality holds in the Cauchy–Schwarz inequality, so $v$ and $w$ are collinear. Their norms are equal and their inner product is positive, hence $v = w$, which is excluded by the problem.

Thus $X = -2$.

Coordinate check. Take $u = (1, 0)$. The equation $\langle u,v\rangle = 1$ gives $v_1 = 1$, and $\|v\| = 2$ gives $v_2 = \pm\sqrt3$; the same is true of $w$. Since $v \ne w$, the signs must be opposite, and therefore

$$\langle v, w\rangle = 1\cdot1 + \sqrt3 \cdot (-\sqrt3) = 1 - 3 = -2$$

This agrees with the root obtained from the determinant.

Answer: $-2$.

A smaller version of the final problem

Problem y1001 has exactly the same structure: put the unknown inner product into two entries of the Gram matrix, set its determinant equal to zero, obtain two roots from a quadratic equation, and eliminate one using an additional condition. Here the condition is “$v \ne w$”; there it is “$v$ and $w$ lie on the same side of a line.” Once this mechanism is clear here, only the arithmetic is different in the final problem.

уверенность1 — угадал, 5 — уверен полностью

Уровень YMLS

решено 2 из 3

Целевая сложность вступительного экзамена. Ответ — число.

Y1001Уровень YMLSступень 4минимумЛинал✓по YMLS Practice Problem 3, Q1 · условие уточнено
RU

В $\mathbb{R}^{2}$ векторы $u$, $v$, $w$ удовлетворяют условиям: $|u| = |v| = \sqrt5$, $u \cdot v = 3$ (угол острый), $|w| = \sqrt{37}$, $u \cdot w = 13$, и система $\{u, v, w\}$ линейно зависима.

Известно также, что $v$ и $w$ отклонены от $u$ в одну и ту же сторону: они лежат в одной полуплоскости относительно прямой $\{t\,u : t \in \mathbb{R}\}$.

Найдите $v \cdot w$. Ответ с четырьмя знаками после запятой.

EN

Vectors $u$, $v$, and $w$ in $\mathbb{R}^{2}$ satisfy $|u| = |v| = \sqrt5$, $u \cdot v = 3$ (so the angle is acute), $|w| = \sqrt{37}$, $u \cdot w = 13$, and the set $\{u, v, w\}$ is linearly dependent.

It is also known that $v$ and $w$ lie on the same side of the line spanned by $u$: they lie in the same open half-plane bounded by the line $\{t\,u : t \in \mathbb{R}\}$.

Find $v \cdot w$. Give your answer to four decimal places.

верно
Подсказка / Hint
RU

Составь таблицу всех попарных скалярных произведений с неизвестной $X = v\cdot w$ и приравняй её определитель нулю. Корней окажется два — разделяет их условие про полуплоскость.

EN

Form the matrix of all pairwise inner products, using $X = v\cdot w$ for the unknown entries, and set its determinant equal to zero. There will be two roots; the half-plane condition distinguishes them.

Решение / Solution
RU

Обозначим $X = v \cdot w$ и составим матрицу Грама — таблицу всех попарных скалярных произведений. На диагонали стоят квадраты длин:

$$G = \begin{pmatrix} 5 & 3 & 13 \\ 3 & 5 & X \\ 13 & X & 37 \end{pmatrix}$$

Линейная зависимость равносильна $\det G = 0$. Раскрывая определитель:

$$-5X^{2} + 78X - 253 = 0 \;\Longleftrightarrow\; 5X^{2} - 78X + 253 = 0$$$$X = \frac{78 \pm \sqrt{6084 - 5060}}{10} = \frac{78 \pm 32}{10} \;\Longrightarrow\; X = 11 \quad \text{или} \quad X = 4.6$$

Какой корень выбрать. Оба корня геометрически реализуемы, так что выбор делает не алгебра, а условие про полуплоскость. Повернём систему координат так, чтобы $u$ смотрел вдоль первой оси: $u = (\sqrt5,\, 0)$. Поворот не меняет ни длин, ни скалярных произведений, поэтому все условия задачи сохраняются.

  • Из $u \cdot w = 13$ первая координата: $\sqrt5\,w_1 = 13$, то есть $w_1 = 13/\sqrt5$. Тогда из $|w|^2 = 37$ вторая: $w_2^2 = 37 - \tfrac{169}{5} = \tfrac{16}{5}$, то есть $w_2 = \pm\tfrac{4}{\sqrt5}$.
  • Из $u \cdot v = 3$ точно так же $v_1 = 3/\sqrt5$, а из $|v|^2 = 5$ получаем $v_2^2 = 5 - \tfrac95 = \tfrac{16}{5}$, то есть $v_2 = \pm\tfrac{4}{\sqrt5}$.

Знак второй координаты — это и есть полуплоскость относительно прямой, натянутой на $u$. Условие «$v$ и $w$ по одну сторону» означает $v_2 w_2 > 0$, и тогда

$$v \cdot w = v_1 w_1 + v_2 w_2 = \frac{3}{\sqrt5}\cdot\frac{13}{\sqrt5} + \frac{16}{5} = \frac{39}{5} + \frac{16}{5} = 11$$

Противоположные знаки дали бы $\tfrac{39}{5} - \tfrac{16}{5} = 4.6$ — это ровно второй корень квадратного уравнения. Перебор всех четырёх сочетаний знаков даёт только два значения, $11$ и $4.6$, так что полуплоскость отсекает лишнее однозначно.

Проверка другим путём. При $v_2 w_2 > 0$ вектор $w$ оказывается равен $2u + v$: первая координата $2\sqrt5 + 3/\sqrt5 = 13/\sqrt5$, вторая $0 + 4/\sqrt5$ — совпадает покоординатно. Значит $v \cdot w = 2(u\cdot v) + (v\cdot v) = 6 + 5 = 11$, и это то же число, полученное без координат вовсе.

Ответ: 11.0000. Это совпадает с официальным ответом. В исходной формулировке YMLS дополнительного условия о полуплоскости нет, поэтому значение $4.6000$ там тоже геометрически реализуемо; здесь добавленное условие однозначно оставляет $11.0000$.

Почему это главная задача блока

Матрица Грама почти не встречается в стандартных курсах первого курса, но стоит прямо в официальных материалах YMLS. Критерий $\det G = 0$ надо знать так же твёрдо, как теорему Пифагора.

И отдельно: квадратное уравнение даёт два корня, и оба могут быть геометрически реализуемы. Умение выбрать нужный по дополнительному условию — часть задачи, а не формальность.

EN

Let $X = v \cdot w$ and form the Gram matrix, the matrix of all pairwise inner products. Its diagonal entries are the squared norms:

$$G = \begin{pmatrix} 5 & 3 & 13 \\ 3 & 5 & X \\ 13 & X & 37 \end{pmatrix}$$

Linear dependence is equivalent to $\det G = 0$. Expanding the determinant gives

$$-5X^{2} + 78X - 253 = 0 \;\Longleftrightarrow\; 5X^{2} - 78X + 253 = 0$$$$X = \frac{78 \pm \sqrt{6084 - 5060}}{10} = \frac{78 \pm 32}{10} \;\Longrightarrow\; X = 11 \quad \text{or} \quad X = 4.6$$

Choose the root. Both roots can be realized geometrically, so the half-plane condition, not algebra, determines the answer. Rotate the coordinate system so that $u$ points along the first axis: $u = (\sqrt5,\, 0)$. Rotation preserves norms and inner products, so all conditions remain valid.

  • From $u \cdot w = 13$, the first coordinate satisfies $\sqrt5\,w_1 = 13$, so $w_1 = 13/\sqrt5$. Then $|w|^2 = 37$ gives $w_2^2 = 37 - \tfrac{169}{5} = \tfrac{16}{5}$, so $w_2 = \pm\tfrac{4}{\sqrt5}$.
  • Similarly, $u \cdot v = 3$ gives $v_1 = 3/\sqrt5$, and $|v|^2 = 5$ gives $v_2^2 = 5 - \tfrac95 = \tfrac{16}{5}$, so $v_2 = \pm\tfrac{4}{\sqrt5}$.

The sign of the second coordinate determines the half-plane relative to the line spanned by $u$. The condition that $v$ and $w$ lie on the same side means $v_2 w_2 > 0$, and then

$$v \cdot w = v_1 w_1 + v_2 w_2 = \frac{3}{\sqrt5}\cdot\frac{13}{\sqrt5} + \frac{16}{5} = \frac{39}{5} + \frac{16}{5} = 11$$

Opposite signs would give $\tfrac{39}{5} - \tfrac{16}{5} = 4.6$, exactly the second root of the quadratic. Checking all four sign combinations yields only the values $11$ and $4.6$, so the half-plane condition removes the extraneous choice unambiguously.

A second check. When $v_2 w_2 > 0$, we have $w = 2u + v$: the first coordinate is $2\sqrt5 + 3/\sqrt5 = 13/\sqrt5$, and the second is $0 + 4/\sqrt5$, matching coordinatewise. Thus $v \cdot w = 2(u\cdot v) + (v\cdot v) = 6 + 5 = 11$, the same value obtained without using coordinates.

Answer: 11.0000. This matches the official answer. The original YMLS statement does not include the half-plane condition, so $4.6000$ can also be realized geometrically there. The added condition in this version uniquely selects $11.0000$.

Why this is the central problem of the unit

Gram matrices rarely appear in standard first-year courses, but one occurs explicitly in the official YMLS materials. The criterion $\det G = 0$ should be known as reliably as the Pythagorean theorem.

Also remember that a quadratic equation gives two roots, and both may be geometrically realizable. Selecting the required one using an additional condition is part of the problem, not a formality.

уверенность1 — угадал, 5 — уверен полностью
Y1002Уровень YMLSступень 4минимумЛиналуровень YMLS · по мотивам ШАД 2024
RU

Вычислите определитель матрицы

$$\begin{pmatrix} 4 & -1 & -1 & 0 \\ -1 & 4 & 0 & -1 \\ -1 & 0 & 4 & -1 \\ 0 & -1 & -1 & 4 \end{pmatrix}$$
EN

Evaluate the determinant of the matrix

$$\begin{pmatrix} 4 & -1 & -1 & 0 \\ -1 & 4 & 0 & -1 \\ -1 & 0 & 4 & -1 \\ 0 & -1 & -1 & 4 \end{pmatrix}$$
неверно · 2-я попытка
Подсказка / Hint
RU

Разложение по строке — это четыре определителя $3\times3$ и почти гарантированная знаковая ошибка. Посчитай вместо этого сумму элементов в каждой строке.

EN

Expanding along a row produces four $3\times3$ determinants and makes a sign error very likely. Instead, calculate the sum of the entries in each row.

Решение / Solution
RU

Сумма элементов одинакова во всех четырёх строках и равна 2. Значит первый ход — прибавить к первому столбцу три остальных: определитель от этого не меняется, а весь первый столбец становится постоянным.

$$\begin{vmatrix} 4 & -1 & -1 & 0 \\ -1 & 4 & 0 & -1 \\ -1 & 0 & 4 & -1 \\ 0 & -1 & -1 & 4 \end{vmatrix} = \begin{vmatrix} 2 & -1 & -1 & 0 \\ 2 & 4 & 0 & -1 \\ 2 & 0 & 4 & -1 \\ 2 & -1 & -1 & 4 \end{vmatrix} = 2\begin{vmatrix} 1 & -1 & -1 & 0 \\ 1 & 4 & 0 & -1 \\ 1 & 0 & 4 & -1 \\ 1 & -1 & -1 & 4 \end{vmatrix}$$

Теперь вычитаем первую строку из трёх остальных — под ведущей единицей появляются нули:

$$= 2\begin{vmatrix} 1 & -1 & -1 & 0 \\ 0 & 5 & 1 & -1 \\ 0 & 1 & 5 & -1 \\ 0 & 0 & 0 & 4 \end{vmatrix} = 2\begin{vmatrix} 5 & 1 & -1 \\ 1 & 5 & -1 \\ 0 & 0 & 4\end{vmatrix}$$

В оставшемся определителе последняя строка почти пустая — раскладываем по ней:

$$= 2 \cdot 4 \begin{vmatrix} 5 & 1 \\ 1 & 5\end{vmatrix} = 2\cdot4\cdot24 = 192$$

Ответ: 192. Четыре определителя $3\times3$ не понадобились: вся работа свелась к одному сложению столбцов и трём вычитаниям строк.

Откуда взялась эта матрица

Это в точности матрица системы из олимпиадной задачи ШАД 2024 «Май в Квадратленде»: температура каждой внутренней клетки равна среднему арифметическому соседей.

Там спрашивали не определитель, а можно ли однозначно восстановить внутренние температуры по граничным. Ответ — да, и доказывается он без всяких вычислений: у матрицы строгое диагональное преобладание ($4 > 1 + 1 + 0$ в каждой строке), а такие матрицы невырождены, значит решение существует и единственно.

Умение сказать «матрица обратима, потому что диагональ доминирует» экономит на экзамене пять минут и производит сильное впечатление на собеседовании.

EN

The entries in each of the four rows have the same sum, 2. Therefore the first move is to add the other three columns to the first. This does not change the determinant and makes the entire first column constant.

$$\begin{vmatrix} 4 & -1 & -1 & 0 \\ -1 & 4 & 0 & -1 \\ -1 & 0 & 4 & -1 \\ 0 & -1 & -1 & 4 \end{vmatrix} = \begin{vmatrix} 2 & -1 & -1 & 0 \\ 2 & 4 & 0 & -1 \\ 2 & 0 & 4 & -1 \\ 2 & -1 & -1 & 4 \end{vmatrix} = 2\begin{vmatrix} 1 & -1 & -1 & 0 \\ 1 & 4 & 0 & -1 \\ 1 & 0 & 4 & -1 \\ 1 & -1 & -1 & 4 \end{vmatrix}$$

Now subtract the first row from each of the other three, producing zeros below the leading 1:

$$= 2\begin{vmatrix} 1 & -1 & -1 & 0 \\ 0 & 5 & 1 & -1 \\ 0 & 1 & 5 & -1 \\ 0 & 0 & 0 & 4 \end{vmatrix} = 2\begin{vmatrix} 5 & 1 & -1 \\ 1 & 5 & -1 \\ 0 & 0 & 4\end{vmatrix}$$

The last row of the remaining determinant is almost entirely zero, so expand along it:

$$= 2 \cdot 4 \begin{vmatrix} 5 & 1 \\ 1 & 5\end{vmatrix} = 2\cdot4\cdot24 = 192$$

Answer: 192. There was no need to evaluate four $3\times3$ determinants: the entire calculation reduced to one column addition and three row subtractions.

Where this matrix comes from

This is exactly the coefficient matrix from the 2024 YSDA olympiad problem “May in Squareland,” where the temperature of each interior cell equals the arithmetic mean of the temperatures of its neighbors.

That problem asks whether the interior temperatures can be recovered uniquely from the boundary values, not for the determinant. The answer is yes, and it can be proved without any calculation: the matrix is strictly diagonally dominant ($4 > 1 + 1 + 0$ in each row), so it is nonsingular and the solution exists and is unique.

Recognizing that “the matrix is invertible because its diagonal dominates” can save five minutes on an exam and is a strong observation in an interview.

уверенность1 — угадал, 5 — уверен полностью
Y1003Уровень YMLSступень 4минимумЛинал✓уровень YMLS
RU

Вычислите $\det\begin{pmatrix} 1 & 1 & 1 \\ 1 & 2 & 3 \\ 1 & 4 & 9 \end{pmatrix}$.

EN

Evaluate $\det\begin{pmatrix} 1 & 1 & 1 \\ 1 & 2 & 3 \\ 1 & 4 & 9 \end{pmatrix}$.

верно
Подсказка / Hint
RU

Присмотрись к строкам: это единицы, сами числа 1, 2, 3 и их квадраты.

EN

Inspect the rows: they contain ones, the numbers 1, 2, 3, and their squares.

Решение / Solution
RU

Столбцы устроены как $(1,\ x,\ x^2)^{T}$ для $x = 1, 2, 3$, то есть строки — это нулевые, первые и вторые степени узлов $1, 2, 3$. Перед нами транспонированная матрица Вандермонда, а $\det A^{T} = \det A$, поэтому работает формула определителя Вандермонда:

$$\det = \prod_{i < j}(x_j - x_i) = (2-1)(3-1)(3-2) = 1 \cdot 2 \cdot 1 = 2$$

Проверка прямым разложением по первой строке:

$$1(2\cdot9 - 3\cdot4) - 1(1\cdot9 - 3\cdot1) + 1(1\cdot4 - 2\cdot1) = 6 - 6 + 2 = 2$$

Совпало.

Зачем знать Вандермонда

Он равен нулю тогда и только тогда, когда среди узлов есть совпадающие. Отсюда следует, что через $n$ различных точек проходит ровно один многочлен степени $n-1$ — факт, который любят проверять и на письменном экзамене, и на собеседовании.

И обратная сторона: если в задаче встретилась матрица со строками вида «единицы, числа, квадраты этих чисел» — как здесь, — считать её определитель разложением незачем, ответ пишется сразу произведением разностей. Из $\det A^{T} = \det A$ то же верно и для транспонированного расположения, когда единицы, числа и квадраты стоят по столбцам: ориентация на ответ не влияет, важно лишь, что это степени одних и тех же узлов.

EN

The columns have the form $(1,\ x,\ x^2)^{T}$ for $x = 1, 2, 3$. Thus the rows contain the zeroth, first, and second powers of the nodes 1, 2, 3. This is the transpose of a Vandermonde matrix. Since $\det A^{T} = \det A$, the Vandermonde determinant formula applies:

$$\det = \prod_{i < j}(x_j - x_i) = (2-1)(3-1)(3-2) = 1 \cdot 2 \cdot 1 = 2$$

Check by direct expansion along the first row:

$$1(2\cdot9 - 3\cdot4) - 1(1\cdot9 - 3\cdot1) + 1(1\cdot4 - 2\cdot1) = 6 - 6 + 2 = 2$$

The results agree.

Why the Vandermonde determinant matters

It is zero if and only if two of the nodes coincide. It follows that there is exactly one polynomial of degree at most $n-1$ passing through $n$ distinct points, a fact often tested both in written exams and in interviews.

Conversely, if a problem contains a matrix whose rows are “ones, numbers, squares of those numbers,” as here, there is no reason to expand its determinant: write the product of differences immediately. Since $\det A^{T} = \det A$, the same is true when ones, numbers, and squares appear in columns. The orientation does not affect the answer; what matters is that these are powers of the same nodes.

уверенность1 — угадал, 5 — уверен полностью

Уровень ШАД

решено 0 из 1

Выше, чем требуется. Берём только там, где тема реально встречалась на их экзаменах.

S1001Уровень ШАДступень 4ЛиналОлимпиада ШАД 2024, задача C «Дороги под Минском»
RU

В области дороги устроены так: любые два города соединяет ровно одна трасса, любые две трассы пересекаются ровно в одном городе, и на каждой трассе лежит не меньше двух городов (может быть и больше).

Всего трасс $n = 2071$. Сколько может быть городов? Если ответ единственный, укажите его.

EN

Roads in a region satisfy the following conditions: every pair of cities is connected by exactly one road, every pair of roads intersects in exactly one city, and every road contains at least two cities.

There are $n = 2071$ roads. How many cities can there be? If the answer is unique, give that value.

неверно · 1-я попытка
Подсказка / Hint
RU

Заведи матрицу «город — трасса» из нулей и единиц и посмотри, что означают произведения $AA^{T}$ и $A^{T}A$.

EN

Construct a zero-one city–road incidence matrix and interpret the products $AA^{T}$ and $A^{T}A$.

Решение / Solution
RU

Пусть $m$ — число городов. Введём матрицу инцидентности $A$ размера $m \times n$: $A_{ij} = 1$, если через город $i$ проходит трасса $j$, и 0 иначе.

Что означает $AA^{T}$. Элемент $(AA^T)_{ij}$ при $i \ne j$ — это число трасс, общих для городов $i$ и $j$. По условию оно равно 1. На диагонали стоит число трасс через город $i$; обозначим его $d_i$.

Покажем, что $d_i \ge 2$. Сначала $d_i \ge 1$, и это не пустая оговорка: на трассе лежит не меньше двух городов, значит городов всего не меньше двух, а любые два города соединены трассой — стало быть через каждый город проходит хотя бы одна трасса. Остаётся отбросить случай $d_i = 1$. Пусть через город $P$ проходит ровно одна трасса $L$. Любой другой город обязан иметь с $P$ ровно одну общую трассу, а она проходит через $P$, значит это $L$. Выходит, что все города лежат на $L$. Возьмём любую другую трассу $L'$ (трасс 2071, так что она есть): на ней не меньше двух городов, и все они лежат на $L$, то есть $|L \cap L'| \ge 2$ — противоречие с условием «ровно один общий город».

Значит $AA^{T} = J_m + D$, где $J_m$ — матрица из одних единиц, а $D$ — диагональная с элементами $d_i - 1 \ge 1$.

Что означает $A^{T}A$. Симметрично: $(A^TA)_{ij}$ при $i \ne j$ — число общих городов у трасс $i$ и $j$, оно равно 1; на диагонали стоит число городов на трассе $j$, и оно не меньше 2 по условию. Значит $A^{T}A = J_n + D'$ с положительной диагональной добавкой.

Обе матрицы невырождены — это факт из урока: для любого ненулевого $\mathbf{x}$ величина $\mathbf{x}^{T}(J + D)\mathbf{x} = (\sum_i x_i)^2 + \sum_i (d_i - 1)x_i^2$ строго положительна, поэтому нулевого вектора в ядре нет.

Финал. По тождеству из урока

$$\rank(AA^{T}) = \rank A = \rank(A^{T}A)$$

Матрица $AA^T$ имеет размер $m\times m$ и невырождена, значит её ранг равен $m$. Матрица $A^TA$ имеет размер $n \times n$ и невырождена, значит её ранг равен $n$. Но обе они равны $\rank A$. Следовательно $m = n = 2071$.

Ответ: ровно 2071 город — минимум и максимум совпадают.

Такая конфигурация действительно существует

Ответ «$m$ обязан равняться $n$» был бы пустым, если бы подходящих конфигураций не существовало вовсе. Вот явная: один город-центр, одна большая трасса, на которой лежат все остальные 2070 городов, и ещё 2070 коротких трасс, соединяющих центр с каждым из них по отдельности. Трасс ровно $1 + 2070 = 2071$, городов тоже 2071, и оба условия выполнены.

Что забрать на YMLS

Приём «закодируй конфигурацию матрицей и работай с рангом». Комбинаторная задача про города и дороги превратилась в утверждение о ранге — и решилась без единого перебора.

Тождество $\rank(A^{T}A) = \rank A$ стоит запомнить отдельно: оно же лежит в основе метода наименьших квадратов, то есть обучения линейной регрессии. Это ровно та причина, по которой линейная алгебра стоит в программе ML-школы.

EN

Let $m$ be the number of cities. Define the $m \times n$ incidence matrix $A$ by $A_{ij} = 1$ if road $j$ passes through city $i$, and $A_{ij}=0$ otherwise.

Interpret $AA^{T}$. For $i \ne j$, the entry $(AA^T)_{ij}$ is the number of roads shared by cities $i$ and $j$, which is 1 by assumption. The diagonal entry is the number of roads through city $i$; denote it by $d_i$.

We claim that $d_i \ge 2$. First, $d_i \ge 1$. This is not vacuous: every road contains at least two cities, so there are at least two cities in total; every pair of cities is joined by a road, hence at least one road passes through each city. It remains to exclude $d_i = 1$. Suppose exactly one road $L$ passes through a city $P$. Every other city must share exactly one road with $P$, and that road passes through $P$, so it must be $L$. Thus all cities lie on $L$. Now take any other road $L'$; one exists because there are 2071 roads. It contains at least two cities, all of which lie on $L$, so $|L \cap L'| \ge 2$, contradicting the condition that two roads share exactly one city.

Therefore $AA^{T} = J_m + D$, where $J_m$ is the all-ones matrix and $D$ is diagonal with entries $d_i - 1 \ge 1$.

Interpret $A^{T}A$. Symmetrically, for $i \ne j$, $(A^TA)_{ij}$ is the number of cities shared by roads $i$ and $j$, equal to 1. A diagonal entry is the number of cities on road $j$, which is at least 2. Thus $A^{T}A = J_n + D'$ with a positive diagonal correction.

Both matrices are nonsingular. For every nonzero $\mathbf{x}$, $\mathbf{x}^{T}(J + D)\mathbf{x} = (\sum_i x_i)^2 + \sum_i (d_i - 1)x_i^2$ is strictly positive, so the kernel contains no nonzero vector.

Conclusion. By the identity

$$\rank(AA^{T}) = \rank A = \rank(A^{T}A)$$

The matrix $AA^T$ is a nonsingular $m\times m$ matrix, so its rank is $m$. The matrix $A^TA$ is a nonsingular $n \times n$ matrix, so its rank is $n$. Both ranks equal $\rank A$. Hence $m = n = 2071$.

Answer: exactly 2071 cities; the minimum and maximum coincide.

Such a configuration really exists

The conclusion “$m$ must equal $n$” would be empty if no valid configuration existed. Here is one: take one central city, one long road containing all other 2070 cities, and 2070 additional short roads, each joining the center to one of those cities. There are exactly $1 + 2070 = 2071$ roads and 2071 cities, and both conditions are satisfied.

The YMLS takeaway

Use the technique “encode the configuration as a matrix and reason about rank.” A combinatorial problem about cities and roads became a rank statement and was solved without enumeration.

The identity $\rank(A^{T}A) = \rank A$ is worth memorizing. It also underlies the least-squares method used to train linear regression models, which is exactly why linear algebra is part of the ML school curriculum.

уверенность1 — угадал, 5 — уверен полностью

Мини-тест под таймером

20 минут

Одна задача, таймер идёт, подсказки и решение не открываются до истечения времени. Это тренировка не математики, а поведения под давлением.

Y1004Уровень YMLSступень 4минимумЛиналуровень YMLS
RU

Найдите сумму всех значений параметра $a$, при которых система

$$\begin{cases} ax + y + z = 1 \\ x + ay + z = a \\ x + y + az = a^{2} \end{cases}$$

не имеет ни одного решения. (Если такое значение единственно, суммой считается оно само; если таких значений нет, ответ 0.)

EN

Find the sum of all values of the parameter $a$ for which the system

$$\begin{cases} ax + y + z = 1 \\ x + ay + z = a \\ x + y + az = a^{2} \end{cases}$$

has no solution. If there is only one such value, that value itself is the required sum; if there are no such values, enter 0.

Подсказка / Hint
RU

Определитель этой матрицы уже разложен на множители в задаче b1003. Дальше каждый его корень надо подставить в систему отдельно — обрати внимание, что правая часть тоже зависит от $a$.

EN

The determinant of this matrix was already factored in problem b1003. Substitute each root into the system separately, remembering that the right-hand side also depends on $a$.

Решение / Solution
RU

Шаг 1. Определитель. Матрица системы — та же, что в b1003, и её определитель равен

$$\det A = (a + 2)(a - 1)^2$$

Он обращается в ноль при $a = 1$ и при $a = -2$. При всех остальных $a$ решение существует и единственно — этот случай закрыт, и считать в нём нечего.

Шаг 2. Случай $a = 1$. Подставляем всюду, включая правые части $1$, $a$, $a^2$:

$$\begin{cases} x + y + z = 1 \\ x + y + z = 1 \\ x + y + z = 1 \end{cases}$$

Три одинаковых уравнения. После вычитаний остаются две нулевые строки: $\rank A = \rank[A\mid\mathbf{b}] = 1$, неизвестных три, свободных переменных $3 - 1 = 2$. Решений бесконечно много, и в ответ это значение не входит.

Шаг 3. Случай $a = -2$. Правая часть равна $(1,\ -2,\ 4)$:

$$\left(\begin{array}{ccc|c} -2 & 1 & 1 & 1 \\ 1 & -2 & 1 & -2 \\ 1 & 1 & -2 & 4\end{array}\right)$$

Сложим все три строки. В каждом столбце коэффициенты дают $-2 + 1 + 1 = 0$, поэтому слева получается $0 \cdot x + 0 \cdot y + 0 \cdot z$, а справа $1 - 2 + 4 = 3$:

$$0 = 3$$

Противоречие: $\rank A = 2$, а $\rank[A\mid\mathbf{b}] = 3$. Решений нет, и это значение в ответ входит.

Ответ: подходит только $a = -2$, сумма равна $-2$.

Три ловушки этой задачи

Первая: сдать сумму корней определителя, то есть $1 + (-2) = -1$. Это ответ на другой вопрос — «при каких $a$ решение не единственно».

Вторая: забыть, что правая часть тоже зависит от $a$. При $a = 1$ она превращается в $(1,1,1)$, и именно поэтому система оказывается совместной; при правой части $(1,2,3)$ ответ был бы другим.

Третья: увидев кратный корень $(a-1)^2$, решить, что «двойной корень — двойное вырождение — точно нет решений». Кратность говорит только о том, насколько сильно падает ранг матрицы (здесь до единицы), и ничего не говорит о совместности. Совместность решается сравнением рангов, и ничем другим.

EN

Step 1. Determinant. The coefficient matrix is the same as in b1003, and its determinant is

$$\det A = (a + 2)(a - 1)^2$$

It vanishes for $a = 1$ and $a = -2$. For every other value of $a$, the solution exists and is unique.

Step 2. The case $a = 1$. Substitute into every occurrence of $a$, including the right-hand side entries $1$, $a$, and $a^2$:

$$\begin{cases} x + y + z = 1 \\ x + y + z = 1 \\ x + y + z = 1 \end{cases}$$

These are three identical equations. Row subtraction leaves two zero rows: $\rank A = \rank[A\mid\mathbf{b}] = 1$. There are three unknowns and $3 - 1 = 2$ free variables, so there are infinitely many solutions. This value is not included.

Step 3. The case $a = -2$. The right-hand side is $(1,\ -2,\ 4)$:

$$\left(\begin{array}{ccc|c} -2 & 1 & 1 & 1 \\ 1 & -2 & 1 & -2 \\ 1 & 1 & -2 & 4\end{array}\right)$$

Add all three rows. In each coefficient column the sum is $-2 + 1 + 1 = 0$, so the left-hand side becomes $0 \cdot x + 0 \cdot y + 0 \cdot z$, whereas the right-hand side is $1 - 2 + 4 = 3$:

$$0 = 3$$

This is a contradiction: $\rank A = 2$ while $\rank[A\mid\mathbf{b}] = 3$. There is no solution, so this value is included.

Answer: only $a = -2$ is valid, and the required sum is $-2$.

Three traps in this problem

First, one might submit the sum of the determinant's roots, $1 + (-2) = -1$. That answers a different question: “for which $a$ is the solution not unique?”

Second, one may forget that the right-hand side also depends on $a$. For $a = 1$, it becomes $(1,1,1)$, which is exactly why the system is consistent. With right-hand side $(1,2,3)$, the answer would differ.

Third, after seeing the repeated root $(a-1)^2$, one may reason that a “double root means double singularity, so there must be no solutions.” Multiplicity only describes how far the matrix rank drops here, to 1; it says nothing about consistency. Consistency is determined by comparing ranks.

уверенность1 — угадал, 5 — уверен полностью
день закрыт, когда
Определитель $3\times3$ считаешь за 90 секунд и проверяешь вторым разложением по другой строке; десять матриц дриля, b1001 и y1003 сделаны без единой ошибки в знакеYou calculate a $3\times3$ determinant in 90 seconds and check it by expanding along another row; ten drill matrices, b1001, and y1003 have no sign errors
Услышав «при каких $a$», за 10 секунд вслух произносишь план — «определитель как многочлен, корни, потом каждый корень отдельно» — и ни разу за день не остановился на «$\det = 0$» как на готовом ответе: b1004, b1006, y1004When you hear “for which $a$?”, you say the plan aloud within 10 seconds — “determinant as a polynomial, roots, then each root separately” — and never stop at “$\det = 0$” as a finished answer: b1004, b1006, y1004
Расширенную матрицу $3\times4$ приводишь к ступенчатому виду за 5 минут и сразу называешь исход, ни разу не спутав два разных нуля: $0 = c$ при $c \ne 0$ — решений нет, $0 = 0$ вместе со столбцом без ведущего элемента — бесконечно много, ведущий элемент в каждом столбце — ровно одноYou reduce an augmented $3\times4$ matrix to row-echelon form in 5 minutes and name the outcome immediately, without confusing the two zero cases: $0 = c$ with $c \ne 0$ means no solutions, $0 = 0$ plus a column without a pivot means infinitely many, and a pivot in every column means exactly one
Матрицу Грама по условию выписываешь за минуту вместе с диагональю из квадратов длин, а в b1007 и y1001 выписаны оба корня квадратного уравнения и лишний отброшен с названной вслух причинойYou write a Gram matrix from the statement in one minute, including squared lengths on the diagonal; in b1007 and y1001 you write both quadratic roots and reject the extra one with a reason stated aloud
Формулируешь критерий Кронекера — Капелли, $\rank A^{T} = \rank A$ и $\rank(A^{T}A) = \rank A$ по памяти за 20 секунд и применяешь их в b1002, b1005 и s1001 без выводаYou can state Rouché–Capelli, $\rank A^{T} = \rank A$, and $\rank(A^{T}A) = \rank A$ from memory in 20 seconds and use them in b1002, b1005, and s1001 without a derivation
Мини-тест y1004 сдан с первого ввода за 20 минут при отведённых 25, причём в ответ ушла сумма значений, при которых решений нет, а не сумма корней определителя; все четыре обязательные задачи ступени 3 решены без подсказкиMini-test y1004 is submitted on the first attempt within 20 minutes of its 25-minute slot, with the sum of values that yield no solutions — not the sum of determinant roots — in the answer; all four mandatory Level 3 problems are solved without hints
аудит дня
RU

Раздели ошибки на два типа и запиши каждую отдельно. Первый тип — не тот ход: сдал сумму корней определителя вместо суммы значений, при которых решений нет; забыл, что корень определителя надо подставить обратно; полез считать определитель у неквадратной системы. Второй тип — ход верный, арифметика нет: потерянный знак в разложении, ошибка в вычитании строк при Гауссе, перепутанный минор.

Знаковые ошибки в определителе считай отдельной строкой журнала. Вчера, в векторах, их аналогом был потерянный минус у косинуса тупого угла; если вчера таких набралось больше двух, сегодня они вернутся именно здесь, только ловить их труднее — в определителе ошибка не выдаёт себя ничем, ответ просто получается другим числом. Единственная защита — второе разложение, и её стоит применять к каждому определителю дня, а не к трудным.

Отдельно запиши, сколько раз ты остановился на $\det = 0$, посчитав это ответом. Эта метрика должна дойти до нуля сегодня же: завтра начинается блок алгоритмов, и вернуться к системам с параметром будет уже негде.

EN

Divide errors into two types and record each separately. Type one is the wrong move: submitting the sum of determinant roots instead of the sum of values giving no solutions; forgetting to substitute a determinant root back into the system; or trying to calculate a determinant for a rectangular system. Type two is the right move with wrong arithmetic: a lost sign in an expansion, an error subtracting rows during elimination, or a mixed-up minor.

Record determinant sign errors on their own line. Yesterday, in vectors, their equivalent was losing the minus sign for the cosine of an obtuse angle; if you had more than two yesterday, they will return here, only harder to catch — a determinant error gives no visible clue, it simply produces another number. The only protection is a second expansion, and you should apply it to every determinant today, not only the difficult ones.

Also record how many times you stopped at $\det = 0$ and treated it as the answer. This metric should reach zero today: tomorrow the algorithms block begins, and there will be no place to return to parameterized systems.