Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
QuantityArray
  • See Also
    • Quantity
    • Normal
    • MapThread
    • QuantityMagnitude
    • QuantityUnit
    • UnitConvert
    • QuantityDistribution
  • Related Guides
    • Structured Arrays
    • Units & Quantities
  • Workflows
    • Calculate with Units
    • See Also
      • Quantity
      • Normal
      • MapThread
      • QuantityMagnitude
      • QuantityUnit
      • UnitConvert
      • QuantityDistribution
    • Related Guides
      • Structured Arrays
      • Units & Quantities
    • Workflows
      • Calculate with Units

QuantityArray[mags,unit]

represents an array of quantities with magnitudes mags and common unit.

QuantityArray[mags,{unit1,unit2,…}]

represents an array of lists of quantities with units {unit1,unit2,…}.

QuantityArray[quants]

converts an array of Quantity objects into a single QuantityArray object.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Properties & Relations  
Possible Issues  
See Also
Related Guides
Related Workflows
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • Quantity
    • Normal
    • MapThread
    • QuantityMagnitude
    • QuantityUnit
    • UnitConvert
    • QuantityDistribution
  • Related Guides
    • Structured Arrays
    • Units & Quantities
  • Workflows
    • Calculate with Units
    • See Also
      • Quantity
      • Normal
      • MapThread
      • QuantityMagnitude
      • QuantityUnit
      • UnitConvert
      • QuantityDistribution
    • Related Guides
      • Structured Arrays
      • Units & Quantities
    • Workflows
      • Calculate with Units

QuantityArray

QuantityArray[mags,unit]

represents an array of quantities with magnitudes mags and common unit.

QuantityArray[mags,{unit1,unit2,…}]

represents an array of lists of quantities with units {unit1,unit2,…}.

QuantityArray[quants]

converts an array of Quantity objects into a single QuantityArray object.

Details

  • QuantityArray[…] is converted to a structured array expression of the form QuantityArray[StructuredData[dims,{mags,…}]].
  • In QuantityArray[mags,unit], the array of magnitudes mags can be a full array of any depth and dimensions.
  • In QuantityArray[mags,{unit1,unit2,…}], the length of the list of uniti must coincide with the deepest dimension of mags.
  • In QuantityArray[mags,…], mags can be a SparseArray object.
  • Normal converts QuantityArray objects to arrays of Quantity objects. To avoid normalization of other structures, like SparseArray or dimensionless Quantity objects, use Normal[qa,QuantityArray]. »

Examples

open all close all

Basic Examples  (3)

A list of lengths, all given in meters:

Extract its magnitudes and units separately:

Normalize the quantity array:

A list of pairs {time,length}:

Extract its magnitudes and units separately:

Convert units:

Convert a normal array of quantities into a QuantityArray representation:

Scope  (6)

Construct an array of quantities with the same unit:

Convert a normal array of quantities with the same unit:

Construct an array of tuples of quantities with different units:

Convert a normal matrix of quantities with the same units in each column:

Construct an array of matrices of quantities with different units:

Convert a normal matrix of quantities with the same units in each subarray:

Construct an array of quantities with IndependentUnit specifications:

Convert an array of Quantity objects into a QuantityArray expression:

QuantityArray objects include properties that give information about the array:

The "Summary" property gives a brief summary of information about the array:

The "StructuredAlgorithms" property gives a list of functions that have algorithms that use the structure of the representation:

The array of magnitudes and the elementary block of units can be extracted using properties:

Properties & Relations  (8)

A QuantityArray object is interpreted as an array of Quantity objects:

It is an array:

It is a list of pairs; hence, a matrix, not a vector:

It is an array of Quantity objects, not an array of numbers:

The QuantityArray representation is memory efficient:

It uses only 6% of the memory of the corresponding normal representation:

It also allows faster extraction of magnitudes and units:

Compare to the slower extraction from the normal array of quantities:

A single quantity is automatically converted into a Quantity object:

This is a list with one quantity:

It can also be given as:

During conversion, QuantityArray does not try to change units:

UnitConvert will unify the units:

The QuantityArray structure is preserved in multiple operations. Take two arrays:

Addition of QuantityArray objects of compatible units, automatically converting some of them:

Multiplication of QuantityArray objects of compatible dimensions:

Tensor product of QuantityArray objects:

Transposition is special because it stores the permutation:

Flattening is also special in that sense:

Partition the array:

Flatten it again:

The result is an equivalent representation of the original quantity array:

Take a QuantityArray object with compatible but different units:

CommonUnits will convert it into a single unit array:

To select the unit, use UnitConvert:

A QuantityArray object of infinite precision:

Numericize to precision 20:

The arithmetic operations take precision into account:

QuantityArray will automatically attempt to interpret an unknown unit string:

Possible Issues  (1)

Normalization of QuantityArray objects also normalizes purely numerical quantities such as percents:

Specify that only the QuantityArray structure should be normalized:

See Also

Quantity  Normal  MapThread  QuantityMagnitude  QuantityUnit  UnitConvert  QuantityDistribution

Related Guides

    ▪
  • Structured Arrays
  • ▪
  • Units & Quantities

Related Workflows

    Related Workflows
    ▪
  • Calculate with Units

History

Introduced in 2015 (10.1) | Updated in 2020 (12.1)

Wolfram Research (2015), QuantityArray, Wolfram Language function, https://reference.wolfram.com/language/ref/QuantityArray.html (updated 2020).

Text

Wolfram Research (2015), QuantityArray, Wolfram Language function, https://reference.wolfram.com/language/ref/QuantityArray.html (updated 2020).

CMS

Wolfram Language. 2015. "QuantityArray." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/QuantityArray.html.

APA

Wolfram Language. (2015). QuantityArray. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/QuantityArray.html

BibTeX

@misc{reference.wolfram_2025_quantityarray, author="Wolfram Research", title="{QuantityArray}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/QuantityArray.html}", note=[Accessed: 01-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_quantityarray, organization={Wolfram Research}, title={QuantityArray}, year={2020}, url={https://reference.wolfram.com/language/ref/QuantityArray.html}, note=[Accessed: 01-December-2025]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Player
  • Wolfram Engine

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English