{"id":37072076,"url":"https://github.com/daniyal1249/ablina","last_synced_at":"2026-01-14T08:27:40.038Z","repository":{"id":270903458,"uuid":"900638448","full_name":"daniyal1249/ablina","owner":"daniyal1249","description":"A Python package for abstract linear algebra","archived":false,"fork":false,"pushed_at":"2025-11-24T18:11:38.000Z","size":1142,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T22:41:54.387Z","etag":null,"topics":["computer-algebra","linear-algebra","manim","math","python","sympy","vector-space"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daniyal1249.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-09T07:36:21.000Z","updated_at":"2025-11-24T17:53:44.000Z","dependencies_parsed_at":"2025-01-10T01:17:48.178Z","dependency_job_id":"46914e1f-c4ca-4334-9f2f-4f48f77a8e91","html_url":"https://github.com/daniyal1249/ablina","commit_stats":null,"previous_names":["daniyal1249/ala-python","daniyal1249/alapy","daniyal1249/ablina"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daniyal1249/ablina","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniyal1249%2Fablina","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniyal1249%2Fablina/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniyal1249%2Fablina/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniyal1249%2Fablina/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daniyal1249","download_url":"https://codeload.github.com/daniyal1249/ablina/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniyal1249%2Fablina/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:16:59.381Z","status":"ssl_error","status_checked_at":"2026-01-14T08:13:45.490Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-algebra","linear-algebra","manim","math","python","sympy","vector-space"],"created_at":"2026-01-14T08:27:39.423Z","updated_at":"2026-01-14T08:27:40.018Z","avatar_url":"https://github.com/daniyal1249.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"text-align: center;\"\u003e\n  \u003cimg src=\"ablina.svg\" alt=\"ablina\" style=\"width: 100%; height: auto;\" /\u003e\n\u003c/div\u003e\n\n## Documentation\n\nhttps://ablina.readthedocs.io/en/latest\n\n\n## Installation\n\nAblina can be installed using pip:\n\n    pip install ablina\n\nor by directly cloning the git repository:\n\n    git clone https://github.com/daniyal1249/ablina.git\n\nand running the following in the cloned repo:\n\n    pip install .\n\n\n## Overview\n\n```python\n\u003e\u003e\u003e from ablina import *\n```\n\n\n### Define a Vector Space\n\nTo define a subspace of $ℝ^n$ or $ℂ^n$, use ``fn``\n\n```python\n\u003e\u003e\u003e V = fn(\"V\", R, 3)\n\u003e\u003e\u003e print(V.info())\n```\n\n    V (Subspace of R^3)\n    -------------------\n    Field      R\n    Identity   [0, 0, 0]\n    Basis      [[1, 0, 0], [0, 1, 0], [0, 0, 1]]\n    Dimension  3\n    Vector     [c0, c1, c2]\n\n\nYou can provide a list of constraints \n\n```python\n\u003e\u003e\u003e U = fn(\"U\", R, 3, constraints=[\"v0 == 0\", \"2*v1 == v2\"])\n\u003e\u003e\u003e print(U.info())\n```\n\n    U (Subspace of R^3)\n    -------------------\n    Field      R\n    Identity   [0, 0, 0]\n    Basis      [[0, 1, 2]]\n    Dimension  1\n    Vector     [0, c0, 2*c0]\n\n\nOr specify a basis \n\n```python\n\u003e\u003e\u003e W = fn(\"W\", R, 3, basis=[[1, 0, 0], [0, 1, 0]])\n\u003e\u003e\u003e print(W.info())\n```\n\n    W (Subspace of R^3)\n    -------------------\n    Field      R\n    Identity   [0, 0, 0]\n    Basis      [[1, 0, 0], [0, 1, 0]]\n    Dimension  2\n    Vector     [c0, c1, 0]\n\n\n### Operations with Vectors\n\nCheck whether a vector is an element of a vector space \n\n\n```python\n\u003e\u003e\u003e [1, 2, 0] in W\n```\n\n    True\n\n\n```python\n\u003e\u003e\u003e [1, 2, 1] in W\n```\n\n    False\n\n\nGenerate a random vector from a vector space \n\n\n```python\n\u003e\u003e\u003e U.vector()\n```\n\n    [0, 2, 4]\n\n\n```python\n\u003e\u003e\u003e U.vector(arbitrary=True)\n```\n\n    [0, c0, 2*c0]\n\n\nFind the coordinate vector representation of a vector \n\n\n```python\n\u003e\u003e\u003e W.to_coordinate([1, 2, 0])\n```\n\n    [1, 2]\n\n\n```python\n\u003e\u003e\u003e W.from_coordinate([1, 2])\n```\n\n    [1, 2, 0]\n\n\n```python\n\u003e\u003e\u003e W.to_coordinate([1, 2, 0], basis=[[1, 1, 0], [1, -1, 0]])\n```\n\n    [3/2, -1/2]\n\n\nCheck whether a list of vectors is linearly independent \n\n\n```python\n\u003e\u003e\u003e V.is_independent([1, 1, 0], [1, 0, 0])\n```\n\n    True\n\n\n```python\n\u003e\u003e\u003e V.is_independent([1, 2, 3], [2, 4, 6])\n```\n\n    False\n\n\n### Operations on Vector Spaces\n\nCheck for equality of two vector spaces \n\n\n```python\n\u003e\u003e\u003e U == W\n```\n\n    False\n\n\nCheck whether a vector space is a subspace of another \n\n\n```python\n\u003e\u003e\u003e V.is_subspace(U)\n```\n\n    True\n\n\n```python\n\u003e\u003e\u003e U.is_subspace(V)\n```\n\n    False\n\n\nTake the sum of two vector spaces \n\n\n```python\n\u003e\u003e\u003e X = U.sum(W)\n\u003e\u003e\u003e print(X.info())\n```\n\n    U + W (Subspace of R^3)\n    -----------------------\n    Field      R\n    Identity   [0, 0, 0]\n    Basis      [[1, 0, 0], [0, 1, 0], [0, 0, 1]]\n    Dimension  3\n    Vector     [c0, c1, c2]\n\n\nTake the intersection of two vector spaces \n\n\n```python\n\u003e\u003e\u003e X = U.intersection(W)\n\u003e\u003e\u003e print(X.info())\n```\n\n    U ∩ W (Subspace of R^3)\n    -----------------------\n    Field      R\n    Identity   [0, 0, 0]\n    Basis      []\n    Dimension  0\n    Vector     [0, 0, 0]\n\n\nTake the quotient of two vector spaces \n\n\n```python\n\u003e\u003e\u003e X = V.quotient(U)\n\u003e\u003e\u003e print(X.info())\n```\n\n    V / U (Subspace of R^3 / U)\n    ---------------------------\n    Field      R\n    Identity   U + [0, 0, 0]\n    Basis      [U + [1, 0, 0], U + [0, 1, -1/2]]\n    Dimension  2\n    Vector     U + [c0, c1, -c1/2]\n\n\nTake the span of a list of vectors \n\n\n```python\n\u003e\u003e\u003e S = V.span(\"S\", [1, 2, 3], [4, 5, 6])\n\u003e\u003e\u003e print(S.info())\n```\n\n    S (Subspace of R^3)\n    -------------------\n    Field      R\n    Identity   [0, 0, 0]\n    Basis      [[1, 0, -1], [0, 1, 2]]\n    Dimension  2\n    Vector     [c0, c1, -c0 + 2*c1]\n\n\n### Define a Linear Map\n\n```python\n\u003e\u003e\u003e def mapping(vec):\n\u003e\u003e\u003e     return [vec[0], vec[1], 0]\n\u003e\u003e\u003e\n\u003e\u003e\u003e T = LinearMap(\"T\", domain=V, codomain=W, mapping=mapping)\n\u003e\u003e\u003e print(T.info())\n```\n\n    T : V → W\n    ---------\n    Field        R\n    Rank         2\n    Nullity      1\n    Injective?   False\n    Surjective?  True\n    Bijective?   False\n    Matrix       [[1, 0, 0], [0, 1, 0]]\n\n\n```python\n\u003e\u003e\u003e T([0, 0, 0])\n```\n\n    [0, 0, 0]\n\n\n```python\n\u003e\u003e\u003e T([1, 2, 3])\n```\n\n    [1, 2, 0]\n\n\n### Operations with Linear Maps\n\nFind the image of a linear map \n\n\n```python\n\u003e\u003e\u003e im = T.image()\n\u003e\u003e\u003e print(im.info())\n```\n\n    im(T) (Subspace of R^3)\n    -----------------------\n    Field      R\n    Identity   [0, 0, 0]\n    Basis      [[1, 0, 0], [0, 1, 0]]\n    Dimension  2\n    Vector     [c0, c1, 0]\n\n\nFind the kernel of a linear map \n\n\n```python\n\u003e\u003e\u003e ker = T.kernel()\n\u003e\u003e\u003e print(ker.info())\n```\n\n    ker(T) (Subspace of R^3)\n    ------------------------\n    Field      R\n    Identity   [0, 0, 0]\n    Basis      [[0, 0, 1]]\n    Dimension  1\n    Vector     [0, 0, c0]\n\n\n### Define an Inner Product\n\nHere we define the standard dot product \n\n```python\n\u003e\u003e\u003e def mapping(vec1, vec2):\n\u003e\u003e\u003e     return sum(i * j for i, j in zip(vec1, vec2))\n\u003e\u003e\u003e\n\u003e\u003e\u003e dot = InnerProduct(\"dot\", vectorspace=V, mapping=mapping)\n\u003e\u003e\u003e print(dot.info())\n```\n\n    dot : V × V → R\n    ---------------\n    Orthonormal Basis  [[1, 0, 0], [0, 1, 0], [0, 0, 1]]\n    Matrix             [[1, 0, 0], [0, 1, 0], [0, 0, 1]]\n\n\n```python\n\u003e\u003e\u003e dot([1, 2, 3], [1, 2, 3])\n```\n\n    14\n\n\n### Operations with Inner Products\n\nCompute the norm of a vector \n\n\n```python\n\u003e\u003e\u003e dot.norm([1, 2, 3])\n```\n\n    sqrt(14)\n\n\nCheck whether a list of vectors is pairwise orthogonal\n\n\n```python\n\u003e\u003e\u003e dot.is_orthogonal([1, 2, 3], [4, 5, 6])\n```\n\n    False\n\n\n```python\n\u003e\u003e\u003e dot.is_orthogonal([0, 0, 0], [1, 2, 3])\n```\n\n    True\n\n\nCheck whether a list of vectors is orthonormal \n\n\n```python\n\u003e\u003e\u003e dot.is_orthonormal([1, 0, 0], [0, 1, 0], [0, 0, 1])\n```\n\n    True\n\n\nTake the orthogonal complement of a vector space \n\n```python\n\u003e\u003e\u003e X = dot.ortho_complement(U)\n\u003e\u003e\u003e print(X.info())\n```\n\n    perp(U) (Subspace of R^3)\n    -------------------------\n    Field      R\n    Identity   [0, 0, 0]\n    Basis      [[1, 0, 0], [0, 1, -1/2]]\n    Dimension  2\n    Vector     [c0, c1, -c1/2]\n\n\n### Define a Linear Operator\n\n```python\n\u003e\u003e\u003e def mapping(vec):\n\u003e\u003e\u003e     return [vec[0], 2*vec[1], 3*vec[2]]\n\u003e\u003e\u003e\n\u003e\u003e\u003e T = LinearOperator(\"T\", vectorspace=V, mapping=mapping)\n\u003e\u003e\u003e print(T.info())\n```\n\n    T : V → V\n    ---------\n    Field        R\n    Rank         3\n    Nullity      0\n    Injective?   True\n    Surjective?  True\n    Bijective?   True\n    Matrix       [[1, 0, 0], [0, 2, 0], [0, 0, 3]]\n\n\n```python\n\u003e\u003e\u003e T([1, 1, 1])\n```\n\n    [1, 2, 3]\n\n\n### Operations with Linear Operators\n\nGiven an inner product, check whether a linear operator \n\n\n```python\n\u003e\u003e\u003e T.is_symmetric(dot)\n```\n\n    True\n\n\n```python\n\u003e\u003e\u003e T.is_hermitian(dot)\n```\n\n    True\n\n\n```python\n\u003e\u003e\u003e T.is_orthogonal(dot)\n```\n\n    False\n\n\n```python\n\u003e\u003e\u003e T.is_unitary(dot)\n```\n\n    False\n\n\n```python\n\u003e\u003e\u003e T.is_normal(dot)\n```\n\n    True\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniyal1249%2Fablina","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniyal1249%2Fablina","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniyal1249%2Fablina/lists"}