Files
maths-cs-ai-compendium-zh/images/column_space.svg
T

46 lines
2.7 KiB
XML

<svg width="420" height="160" xmlns="http://www.w3.org/2000/svg">
<defs>
<marker id="cs-arr" markerWidth="7" markerHeight="5" refX="7" refY="2.5" orient="auto">
<path d="M0,0 L7,2.5 L0,5" fill="#999"/>
</marker>
<marker id="cs-r" markerWidth="7" markerHeight="5" refX="7" refY="2.5" orient="auto">
<path d="M0,0 L7,2.5 L0,5" fill="#e74c3c"/>
</marker>
<marker id="cs-b" markerWidth="7" markerHeight="5" refX="7" refY="2.5" orient="auto">
<path d="M0,0 L7,2.5 L0,5" fill="#3498db"/>
</marker>
</defs>
<!-- Left: 2 columns in 3D that span a plane -->
<text x="100" y="14" text-anchor="middle" fill="#333" font-size="12" font-weight="bold">Column space (2 columns in 3D)</text>
<!-- axes -->
<line x1="30" y1="140" x2="180" y2="140" stroke="#ccc" stroke-width="1" marker-end="url(#cs-arr)"/>
<line x1="30" y1="140" x2="30" y2="22" stroke="#ccc" stroke-width="1" marker-end="url(#cs-arr)"/>
<line x1="30" y1="140" x2="0" y2="155" stroke="#ccc" stroke-width="1"/>
<circle cx="30" cy="140" r="3" fill="#333"/>
<!-- col 1 -->
<line x1="30" y1="140" x2="140" y2="70" stroke="#e74c3c" stroke-width="2.5" marker-end="url(#cs-r)"/>
<text x="100" y="90" fill="#e74c3c" font-size="11">col 1</text>
<!-- col 2 -->
<line x1="30" y1="140" x2="80" y2="35" stroke="#3498db" stroke-width="2.5" marker-end="url(#cs-b)"/>
<text x="42" y="72" fill="#3498db" font-size="11">col 2</text>
<!-- shaded plane -->
<polygon points="30,140 140,70 190,0 80,35" fill="#9b59b6" fill-opacity="0.1" stroke="#9b59b6" stroke-width="1" stroke-dasharray="4"/>
<text x="100" y="155" fill="#666" font-size="10">reachable outputs = a plane</text>
<!-- Divider -->
<line x1="210" y1="10" x2="210" y2="155" stroke="#ddd" stroke-width="1" stroke-dasharray="4"/>
<!-- Right: 2 parallel columns span only a line -->
<text x="320" y="14" text-anchor="middle" fill="#333" font-size="12" font-weight="bold">Dependent columns</text>
<line x1="240" y1="140" x2="400" y2="140" stroke="#ccc" stroke-width="1" marker-end="url(#cs-arr)"/>
<line x1="240" y1="140" x2="240" y2="22" stroke="#ccc" stroke-width="1" marker-end="url(#cs-arr)"/>
<circle cx="240" cy="140" r="3" fill="#333"/>
<!-- col 1 -->
<line x1="240" y1="140" x2="360" y2="70" stroke="#e74c3c" stroke-width="2.5" marker-end="url(#cs-r)"/>
<text x="310" y="90" fill="#e74c3c" font-size="11">col 1</text>
<!-- col 2 (same direction, shorter) -->
<line x1="240" y1="140" x2="300" y2="105" stroke="#3498db" stroke-width="2.5" marker-end="url(#cs-b)"/>
<text x="280" y="115" fill="#3498db" font-size="11">col 2</text>
<text x="320" y="155" fill="#666" font-size="10">reachable outputs = only a line</text>
</svg>